The code currently is:
In sheet module:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = Range("xxxx").Address Then
SelectAccount
Else: Unload UserForm1
End If
End Sub
In main module:
Sub SelectAccount()
UserForm1.ListBox1.RowSource = Range("xxxxList").Address
UserForm1.ListBox1.ControlSource = Range("xxxx").Address
With UserForm1
.Show vbModeless
.Move 450, 100
End With
End Sub
The code attached to the OK/Cancel buttons is just:
Unload UserForm1
Thanks,
Partho
--
Regards,
Tom Ogilvy
"Partho" <Par...@discussions.microsoft.com> wrote in message
news:E3E10DC3-18DE-4817...@microsoft.com...
The problem is that when the cell is activated and the user form appears,
the user form is the active window. Therefore, when I hit up/down arrow, I
move between the controls in the user form rather than to the next cell in
the worksheet. ideally I would like the user form to be in the 'background'
until the user actually clicks in it.
Partho
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$C$3" Then
UserForm1.Show vbModeless
AppActivate Application.Caption
End If
End Sub
Adjust to your code.
Of course if the user wants to enter a value, then they would have to click
in the form.
--
Regards,
Tom Ogilvy
"Partho" <Par...@discussions.microsoft.com> wrote in message
news:C724D7E4-084B-4EC2...@microsoft.com...
AppActivate fixes my problem! Thanks for your help!
Partho