ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Spreadsheet Component not setting focus (https://www.excelbanter.com/excel-programming/412525-spreadsheet-component-not-setting-focus.html)

Craig[_4_]

Spreadsheet Component not setting focus
 
Hello there!
I have 5 spreadsheet components on a userform each getting info for editing
from various worksheets.
My problem is that I cannot get focus when starting the userform.

My code: spreadsheet1.worksheets(1).range("A1").Select

I would like to just start typing when the userform starts. If I only had 1
spreadsheet component on the form then it works fine. If I change the code
to spreadsheet5...... then the first spreadsheet is still the active one.
Is there a way around this... I think I have tried everything and it's
driving me nuts! I've played witht tabindex, tabstops... with no luck. In my
program I enter this userform from different locations of the workbook...
each directing which spreadsheet component and cell to start at.... I hate
having to click on the cell before I can type.

All HELP will be very appriciated!

Thanks Craig



Corey ....[_2_]

Spreadsheet Component not setting focus
 
spreadsheet1.worksheets(1).range("A1").SetFocus ?
"Craig" wrote in message
news:ZVh4k.3165$kx.1864@pd7urf3no...
Hello there!
I have 5 spreadsheet components on a userform each getting info for
editing from various worksheets.
My problem is that I cannot get focus when starting the userform.

My code: spreadsheet1.worksheets(1).range("A1").Select

I would like to just start typing when the userform starts. If I only had
1 spreadsheet component on the form then it works fine. If I change the
code to spreadsheet5...... then the first spreadsheet is still the active
one.
Is there a way around this... I think I have tried everything and it's
driving me nuts! I've played witht tabindex, tabstops... with no luck. In
my program I enter this userform from different locations of the
workbook... each directing which spreadsheet component and cell to start
at.... I hate having to click on the cell before I can type.

All HELP will be very appriciated!

Thanks Craig





Craig[_4_]

Spreadsheet Component not setting focus
 
SetFocus isn't a property used with the Spreadsheet Components!
Craig

"Corey ...." wrote in message
...
spreadsheet1.worksheets(1).range("A1").SetFocus ?
"Craig" wrote in message
news:ZVh4k.3165$kx.1864@pd7urf3no...
Hello there!
I have 5 spreadsheet components on a userform each getting info for
editing from various worksheets.
My problem is that I cannot get focus when starting the userform.

My code: spreadsheet1.worksheets(1).range("A1").Select

I would like to just start typing when the userform starts. If I only had
1 spreadsheet component on the form then it works fine. If I change the
code to spreadsheet5...... then the first spreadsheet is still the active
one.
Is there a way around this... I think I have tried everything and it's
driving me nuts! I've played witht tabindex, tabstops... with no luck. In
my program I enter this userform from different locations of the
workbook... each directing which spreadsheet component and cell to start
at.... I hate having to click on the cell before I can type.

All HELP will be very appriciated!

Thanks Craig








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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com