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 sizbut 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
  • 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 think Select Case can be used to execute the correct number of levels: Given that Run_Number is the number of variables to be evaluated; ---------------------------------------------------------- Public Sub Optimum_Schedule() Select Case Run_Number Case 2: GoTo Two_Runs Case 3: GoTo Three...
  3. 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)...
  4. f64

    Generating All Combinations of Array Data

    The program is being written to demonstrate to clinical lab managers how to schedule their diagnostic assays on a batch basis rather than on demand. A “raw” schedule might look like this: Assay Day 1 Day 2 Day 3 Day 4 …….. Day 24 1 40 90 100 100 25 2 50 50 50 50 50 3 0 75 0 75 0 4 25 50 0...
  5. f64

    Generating All Combinations of Array Data

    I'm not sure I'm explaining myself clearly. PHV, what you described will iterate through the 8 x 24 = 192 individual entries, but the program must evaluate the entries in groups of 8, one from each x. Does iterating through the individual entries generate all possible combinations? GlennUK -...
  6. 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?
  7. 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 #...
  8. 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...
  9. 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...
  10. f64

    Selected Listbox Row Not Highlighted

    Mike and Gerry, Thanks for your feedback. After you indicated you had no problem highlighting the selection in a listbox, I took a closer look, and discovered that while I was indeed setting the listindex numbers on page 2, when leaving page 4 I was invoking a subroutine that cleared and then...
  11. f64

    Selected Listbox Row Not Highlighted

    Mike, I have created a multipage userform to input data to a SIMUL8 simulation, and the user has asked to have the capability to save and restore previous data. When the userform is closed, the contents of all variables, testboxes and listboxes are written to a hidden sheet. When the userform...
  12. 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...
  13. 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...
  14. f64

    Select Listbox Row from Code

    Is it possible to use the Selected property to select a row in a listbox programmatically from code?
  15. 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...
  16. 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?
  17. 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...
  18. 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...
  19. 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...
  20. 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...

Part and Inventory Search

Back
Top