Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
That seems to have fixed one problem but now there is another one on how to
set ws v ariable. Since it is a userform I probably don't need to activate it since it is already activated? All I need to do is set the worksheet patients. I don't know if it needs to be the active workbook but there is a runtime error. thanks in advance, Private Sub UserForm_Initialize() Dim intLastRow As Integer Dim ws As Worksheet Dim c As Range Dim rng As Range Set ws = xl.Worksheets("patients") intLastRow = ws.Cells.SpecialCells(xlCellTypeLastCell).Row Set rng = ws .Range("A1:A" & intLastRow) ComboBox2.Clear For Each c In Worksheets("patients").rng ComboBox2.AddItem c.Value Next c End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Setting a string variable as the file name | Excel Discussion (Misc queries) | |||
Setting up variable summary sheet. | Excel Discussion (Misc queries) | |||
Userform button setting variable from formula | Excel Discussion (Misc queries) | |||
Userform button setting variable from formula | Excel Discussion (Misc queries) | |||
Setting a variable cell address | Excel Discussion (Misc queries) |