ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,731
- Office Version
- 2007
- Platform
- Windows
Hi
On my userform i have some Textboxes & 2 Listboxes
The Textboxes in question are TextBoxFind & TextBoxReplace
Basically if TextBoxFind has a value in it then set focus on TextBoxReplace
I have this but does nothing.
My understanding which i assume is wrong is that > 0 means anything in the cell ?
Then there is > 1
Ive tried both but still no joy, as you can see in my photo example the value in the Listbox is focused & im looking at setting focus in Textbox.
It works by me typing a value in the the first Textbox,listbox values are shown,a value is selected & placed in Textbox & now i would like the focus set on other Textbox
I see this is the Listbox code but thought after selection was made my Textbox code would overrule it and focus on Textbox.
On my userform i have some Textboxes & 2 Listboxes
The Textboxes in question are TextBoxFind & TextBoxReplace
Basically if TextBoxFind has a value in it then set focus on TextBoxReplace
I have this but does nothing.
VBA Code:
Private Sub TextBoxFind_Change()
TextBoxFind = UCase(TextBoxFind)
If TextBoxFind.Value > 0 Then
TextBoxReplace.SetFocus
End If
End Sub
My understanding which i assume is wrong is that > 0 means anything in the cell ?
Then there is > 1
Ive tried both but still no joy, as you can see in my photo example the value in the Listbox is focused & im looking at setting focus in Textbox.
It works by me typing a value in the the first Textbox,listbox values are shown,a value is selected & placed in Textbox & now i would like the focus set on other Textbox
I see this is the Listbox code but thought after selection was made my Textbox code would overrule it and focus on Textbox.
Rich (BB code):
TextBoxSearchColumnC.SetFocus