Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I have placed a textbox on a worksheet from the Controls toolbar. How can I set the focus on the textbox when the workbook is opened. I can't find a method to set the focus to this control. Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
just a question.
you try the ActiveSheet.Shapes("TextBox1").setfocus '--- ? -- üdv:regards L@ja DZ ezt *rta: Hi I have placed a textbox on a worksheet from the Controls toolbar. How can I set the focus on the textbox when the workbook is opened. I can't find a method to set the focus to this control. Thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ActiveSheet.Shapes("TextBox1").setfocus '--- ?
That give me a 'Run-time error '438' Object doesn't support this property or method on my XL97. What version are you? Dave D-C L@ja wrote: just a question. you try the ActiveSheet.Shapes("TextBox1").setfocus '--- ? -- dv:regards L@ja DZ ezt rta: Hi I have placed a textbox on a worksheet from the Controls toolbar. How can I set the focus on the textbox when the workbook is opened. I can't find a method to set the focus to this control. Thanks |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Option Explicit
Sub Auto_Open() Worksheets("sheet1").TextBox1.Activate End Sub In xl2003, I didn't have to select the sheet first. If this doesn't work, try: Option Explicit Sub Auto_Open() with worksheets("Sheet1") .select .TextBox1.Activate end with End Sub DZ wrote: Hi I have placed a textbox on a worksheet from the Controls toolbar. How can I set the focus on the textbox when the workbook is opened. I can't find a method to set the focus to this control. Thanks -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for your responses. It's Excel 97.
I get 'Run-time error '438' with Activate. There doesn't seem to be a way to do this with a Controls Toolbar textbox. Regards DZ |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It worked ok in xl2003 for me.
But I don't have xl97 to test. DZ wrote: Thanks for your responses. It's Excel 97. I get 'Run-time error '438' with Activate. There doesn't seem to be a way to do this with a Controls Toolbar textbox. Regards DZ -- Dave Peterson |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In Module1:
Sub Auto_Open() Sheets("Sheet1").TextBox1.Activate End Sub This works in my XL97 -- doesn't need sheet select. I wonder what could be different? Dave D-C Dave Peterson wrote: It worked ok in xl2003 for me. But I don't have xl97 to test. DZ wrote: Thanks for your responses. It's Excel 97. I get 'Run-time error '438' with Activate. There doesn't seem to be a way to do this with a Controls Toolbar textbox. Regards DZ |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Maybe the user made a typing error????
Who knows? Dave D-C wrote: In Module1: Sub Auto_Open() Sheets("Sheet1").TextBox1.Activate End Sub This works in my XL97 -- doesn't need sheet select. I wonder what could be different? Dave D-C Dave Peterson wrote: It worked ok in xl2003 for me. But I don't have xl97 to test. DZ wrote: Thanks for your responses. It's Excel 97. I get 'Run-time error '438' with Activate. There doesn't seem to be a way to do this with a Controls Toolbar textbox. Regards DZ -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
allow entry in only one txtbox | Excel Programming | |||
Keeping focus on a txtbox 2 | Excel Programming | |||
Keeping focus on a txtbox | Excel Programming | |||
Keeping focus on a txtbox | Excel Programming | |||
To put value from txtbox to cell? | Excel Programming |