Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default runtime Error '424' using Application.Selection

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default runtime Error '424' using Application.Selection

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



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default runtime Error '424' using Application.Selection

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Runtime error '424': Object Required loren.pottinger Excel Discussion (Misc queries) 1 August 28th 06 09:56 PM
runtime error 75 when I run the application for second time divya Excel Programming 2 July 8th 06 11:58 AM
"Microsoft Visual Basic runtime error '424' object required". SharonG. Excel Worksheet Functions 0 July 5th 06 01:36 AM
Runtime error 1004- application defined or object defined error Jim Thomlinson[_5_] Excel Programming 0 February 6th 06 09:33 PM
Syntax Error Runtime Error '424' Object Required sjenks183 Excel Programming 1 January 23rd 04 09:25 AM


All times are GMT +1. The time now is 12:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"