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 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)...
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...
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...
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...
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...
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...
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?
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.