Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: f64
  • Content: Threads
  • Order by date
  1. f64

    BeforeUpdate event Compile Error

    Numeric values are being entered into a textbox on a userform. I need to check that they are in increments of five. I am trying to use the BeforeUpdate event for the textbox to call a subroutine that will check the value and round up if necessary. The textbox is tbHIVRNA. Private Sub...
  2. f64

    Varying Number Of Nested Loops

    I am writing a program that requires evaluating combinations of from 2 to 5 variables. For Variable_E = 1 To 10 For Variable_D = 1 To 10 For Variable_C = 1 To 10 For Variable_B = 1 To 10 For Variable_A = 1 To 10 Total = Function (Variable_A) + Function (Variable_B)...
  3. f64

    Generating All Combinations of Array Data

    I am writing a program that contains an array; Data(x, y), x = 1 To 8, y = 1 To 24; The program must generate and evaluate all combinations of y, taken 8 at a time, 1 from each x. What is the most efficient code to generate all the combinations?
  4. f64

    How to Set ListBox.Value

    For a ListBox, is setting the ListIndex property the same as setting the value property? Given a ListBox already populated with; AAAAA BBBBB CCCCC DDDDD ListBox.value = "BBBBB" does not set the value but ListBox.ListIndex = 1 does select BBBBB Does setting the value also set the ListIndex #...
  5. f64

    Does Setting ListBox.ListIndex Invoke Listbox_Click Event?

    Does setting the ListBox.ListIndex value automatically invoke the Listbox_Click event? In a section of code outside of the ListBox_Click event I am setting the value of ListBox.ListIndex. After this is executed, changes are made to the ListBox indicating the ListBox_Click event had been...
  6. f64

    Validating Textbox Entry As Numeric

    In a Subroutine, I am validating that a textbox entry is numeric. If a non-numeric is entered, a message is displayed, and when OK is clicked I would like to re-enter the value in the textbox, after deleting the rightmost non-numeric character. Dim Entry As Object...
  7. f64

    Selected Listbox Row Not Highlighted

    I am selecting a row in a listbox (single column, MultiSelectSingle) by code, and when the listbox is displayed in a userform the selected row is neither highlighted in blue, nor is it enclosed in the focus rectangle. I have tried the Selected, Value, and ListIndex properties, and none have the...
  8. f64

    Subdividing Userform Code

    I have created a multipage userform with numerous textboxes, listboxes, and spin buttons, and the code has grown to over 2,500 lines. I tried to subdivide the code by placing part of the code into a separate module, but the usereform couldn't recognize it whether it was a private or public sub...
  9. f64

    Select Listbox Row from Code

    Is it possible to use the Selected property to select a row in a listbox programmatically from code?
  10. f64

    Re-Populate Listbox Contents

    I am employing a multipage userform to fill in an Excel spreadsheet. The contents of a listbox is assembled by using "AddItem", based on selections made in other listboxes. The list may contain one to four items. The user would like to save the spreadsheet and re-launch the userform, and the...
  11. f64

    Determining Application Process ID #

    Knowing an application's Task Name, but not it's Image Name, is it possible to determine it's Process ID# in the current session, when it is already open?
  12. f64

    Problem Disabling Close Window Save Option

    I am trying to disable the "Do You Want to Save Changes ..." dialog that appears when you click the Close Window button in Excel. When I entered the following; Private Sub Workbook_BeforeClose(Cancel As Boolean) ActiveWorkbook.Close SaveChanges:=False End Sub An error...
  13. f64

    Testing Listbox.Value = Null

    On a multipage userform, I would like to verify that a selection has been made in a listbox when the form is advanced to the next page. If ListBox.Value = Null Then Statement1 End If When reaching this statement during debugging, ListBox.Value is...
  14. f64

    Formatting VBA Code

    Is it possible to apply formatting (text color, boldface, underline, etc.) to VBA code itself? Beyond indenting and skipping rows, it would be helpful to be able to delineate blocks of code with some additional formatting. When printed on a color printer, even my green comments print black...
  15. f64

    Dictating MsgBox Location

    Is it possible to control the location where a MsgBox appears on a UserForm? I am testing data entered into a textbox, and if the test fails a MsgBox appears onscreen. Unfortunately, it covers up the textbox being tested. If possible, I would like the textbox to be visible after the MsgBox...
  16. f64

    Powerpoint Slide Index # / Name

    I am writing a VB subroutine to copy charts from Excel and paste them into an existing PowerPoint Slide Presentation. Do I remember reading somewhere that it is possible to refer to a PowerPoint slide by a name, rather than the index number? I am trying to anticipate slides being inserted...
  17. f64

    AppActivate Syntax

    I am trying to use AppActivate to shift screen focus from Excel to a simulation program, SIMUL8, but I am having trouble debugging the statement. I have tried AppActivate “SIMUL8” and AppActivate “nnnnnnnn SIMUL8” (where nnnnnnnn is the model name) and I keep getting a “Run-time...
  18. f64

    Switching Application Displayed On Screen

    I am developing a computer simulation in SIMUL8 together with a userform in Excel to input configuration data and draw graphs of results. When “Finish” is clicked on the Excel Userform, VB calls the simulation, the simulation imports the configuration data and executes, and upon completion...
  19. f64

    Updating a date in a Text Box With A SpinButton

    I am displaying a text box on a userform set to the current date in mm/dd/yyyy format. Is it possible to change the day in the text box with a spinbutton?

Part and Inventory Search

Back
Top