hitch_hiker
Active Member
- Joined
- Feb 21, 2012
- Messages
- 294
I have the following macro which works perfect except... after selecting an item and loading it into the next available cell I need the userform to vanish, so I put the Unload Me at the end, without Unload Me the combobox puts the data in the nest available cell and stays on the screen , select another and it faithfully puts it into the next available cell ad infinitum, when I put Unload Me, in the cell does not receive any data but the userform vanishes, any suggestions, perhaps there is a better way to make the userform disappear once it has been used
Rich (BB code):
Private Sub cmdAddPart_Click()
Dim adr As String
Dim ws As Worksheet
Set ws = Worksheets("ORDER INPUT")
' find blank cell
'Dim adr As String
Range("c10").Select
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
' load addr with blank cell reference
adr = ActiveCell.Address(ReferenceStyle:=xlA1)
With cboPart
.ControlSource = adr
End With
Unload Me
End Sub
Last edited: