Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi everyone,
I have that piece of code to set the focus of a userform to a certain sheet and cell but problem is I keep on getting a runtime error '424' Dim selRange As Range Set selRange = Application.Selection 'ecDisplayLocationRE.Text = "'" & selRange.Worksheet.Name & "'!" & selRange.Address bpDisplayLocationRE.Text = "'" & selRange.Worksheet.Name & "'!" & selRange.Address 'ecDisplayLocation.SetFocus bpDisplayLocation.SetFocus Thks for the help |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Without having tested it, I would say, try...
bpDisplayLocationRE.Text = "'" & selRange.Parent.Name & "'!" & selRange.Address instead of... bpDisplayLocationRE.Text = "'" & selRange.Worksheet.Name & "'!" & selRange.Address -- HTH, Gary Brown If this post was helpful to you, please select ''YES'' at the bottom of the post. "malpropio" wrote: Hi everyone, I have that piece of code to set the focus of a userform to a certain sheet and cell but problem is I keep on getting a runtime error '424' Dim selRange As Range Set selRange = Application.Selection 'ecDisplayLocationRE.Text = "'" & selRange.Worksheet.Name & "'!" & selRange.Address bpDisplayLocationRE.Text = "'" & selRange.Worksheet.Name & "'!" & selRange.Address 'ecDisplayLocation.SetFocus bpDisplayLocation.SetFocus Thks for the help |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Same result, still getting th Runtime Error.
On Mar 19, 2:26 pm, Gary Brown wrote: Without having tested it, I would say, try... bpDisplayLocationRE.Text = "'" & selRange.Parent.Name & "'!" & selRange.Address instead of... bpDisplayLocationRE.Text = "'" & selRange.Worksheet.Name & "'!" & selRange.Address -- HTH, Gary Brown If this post was helpful to you, please select ''YES'' at the bottom of the post. "malpropio" wrote: Hi everyone, I have that piece of code to set the focus of a userform to a certain sheet and cell but problem is I keep on getting a runtime error '424' Dim selRange As Range Set selRange = Application.Selection 'ecDisplayLocationRE.Text = "'" & selRange.Worksheet.Name & "'!" & selRange.Address bpDisplayLocationRE.Text = "'" & selRange.Worksheet.Name & "'!" & selRange.Address 'ecDisplayLocation.SetFocus bpDisplayLocation.SetFocus Thks for the help |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
No bpDisplayLocationRE is a RefEdit not a TextBox.
On Mar 19, 4:28 pm, Gary Brown wrote: I'm assuming 'bpDisplayLocationRE' is a text box. What is 'bpDisplayLocation'? -- HTH, Gary Brown If this post was helpful to you, please select ''YES'' at the bottom of the post. "malpropio" wrote: Same result, still getting th Runtime Error. On Mar 19, 2:26 pm, Gary Brown wrote: Without having tested it, I would say, try... bpDisplayLocationRE.Text = "'" & selRange.Parent.Name & "'!" & selRange.Address instead of... bpDisplayLocationRE.Text = "'" & selRange.Worksheet.Name & "'!" & selRange.Address -- HTH, Gary Brown If this post was helpful to you, please select ''YES'' at the bottom of the post. "malpropio" wrote: Hi everyone, I have that piece of code to set the focus of a userform to a certain sheet and cell but problem is I keep on getting a runtime error '424' Dim selRange As Range Set selRange = Application.Selection 'ecDisplayLocationRE.Text = "'" & selRange.Worksheet.Name & "'!" & selRange.Address bpDisplayLocationRE.Text = "'" & selRange.Worksheet.Name & "'!" & selRange.Address 'ecDisplayLocation.SetFocus bpDisplayLocation.SetFocus Thks for the help |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Runtime error '424': Object Required | Excel Discussion (Misc queries) | |||
runtime error 75 when I run the application for second time | Excel Programming | |||
"Microsoft Visual Basic runtime error '424' object required". | Excel Worksheet Functions | |||
Runtime error 1004- application defined or object defined error | Excel Programming | |||
Syntax Error Runtime Error '424' Object Required | Excel Programming |