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...
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...
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)...
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...
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 -...
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?
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 #...
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...
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...
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...
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...
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...
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...
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...
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?
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...
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...
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...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.