Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
F.C F.C is offline
external usenet poster
 
Posts: 1
Default visual basic command identify a worksheet in a workbook

A staff member produced an insert macro using visual basic editor in excel
When I attempt to insert a sheet, the macro always selects the first sheet
of a multipal book. The following command has been used.
Sheets ("Command Page").Select

How can I identify a specfic sheet in a workbook
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default visual basic command identify a worksheet in a workbook

perhaps

to get the last sheet as an example.

With thisworkbook
.Worksheets(.Worksheets.count).Select
End With

or you can specify a specific sheet,

Worksheets("MyNewSheet").Select

but that is what you are already doing.

--
Regards,
Tom Ogilvy

"F.C" wrote in message
...
A staff member produced an insert macro using visual basic editor in excel
When I attempt to insert a sheet, the macro always selects the first sheet
of a multipal book. The following command has been used.
Sheets ("Command Page").Select

How can I identify a specfic sheet in a workbook



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default visual basic command identify a worksheet in a workbook

Dear Tom


I ended up doing the following

Worksheets("Export").Select

Thank you for your help

Kind Regards
Frank



"Tom Ogilvy" wrote:

perhaps

to get the last sheet as an example.

With thisworkbook
.Worksheets(.Worksheets.count).Select
End With

or you can specify a specific sheet,

Worksheets("MyNewSheet").Select

but that is what you are already doing.

--
Regards,
Tom Ogilvy

"F.C" wrote in message
...
A staff member produced an insert macro using visual basic editor in excel
When I attempt to insert a sheet, the macro always selects the first sheet
of a multipal book. The following command has been used.
Sheets ("Command Page").Select

How can I identify a specfic sheet in a workbook




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
Help me please understand this Visual Basic command Steve Excel Discussion (Misc queries) 1 September 16th 08 06:14 PM
VISUAL BASIC COMMAND TO MOVE CURSER DOWN ONE CELL Moving Problem! Excel Worksheet Functions 2 December 19th 06 08:00 AM
Problems in Visual Basic Editior, In search of a command Matt G[_7_] Excel Programming 3 June 17th 04 04:06 PM
Saving Workbook in Visual Basic Hides the Worksheet, Why bmartin52 Excel Programming 0 January 10th 04 06:33 PM
visual basic command in a cell?? konky Excel Programming 1 August 26th 03 06:33 PM


All times are GMT +1. The time now is 08:48 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"