Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
JH JH is offline
external usenet poster
 
Posts: 64
Default SetFocus problem

Hello,
please does anyone know why this code gives run-time error - object doesn't
suport this properity or method



Private Sub Radio2_Click()
Worksheets("start").TextBox3.Enabled = True
Worksheets("start").TextBox3.BackColor = &HFFFFC0
Worksheets("start").TextBox3.SetFocus -THIS LINE CAUSES RUN-TIME ERROR

End Sub

thanks in adavance for any suggestions

JH

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default SetFocus problem

You have to use activate when it is located on a worksheet. The setfocus
method belongs to the control object and it is only available in a userform.

--
Regards,
Tom Ogilvy


"JH" wrote in message
...
Hello,
please does anyone know why this code gives run-time error - object

doesn't
suport this properity or method



Private Sub Radio2_Click()
Worksheets("start").TextBox3.Enabled = True
Worksheets("start").TextBox3.BackColor = &HFFFFC0
Worksheets("start").TextBox3.SetFocus -THIS LINE CAUSES RUN-TIME ERROR

End Sub

thanks in adavance for any suggestions

JH



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
setfocus Dean Reardon Excel Programming 2 December 15th 04 12:18 PM
Userform setfocus problem Martin Hibberd[_2_] Excel Programming 1 November 10th 04 12:12 PM
SetFocus Problem Todd Huttenstine[_2_] Excel Programming 2 January 19th 04 10:50 PM
TextBox SetFocus Problem Tom Ogilvy Excel Programming 1 September 12th 03 01:27 PM
SetFocus problem RFraley Excel Programming 2 September 7th 03 01:18 PM


All times are GMT +1. The time now is 04:39 AM.

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

About Us

"It's about Microsoft Excel"