Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Copy Sheet Names to a Column

Disregard 1st question, I found the solution in another post.

New question and pretty simple one (but not for me... Krikee). How do I
jump to or select a specific sheet in my workbook so my macro will always run
on that one sheet.

Sheets("Code Master").Activate
Sheets("Code Master").Select

Any help would be appreciated.

Thanks!

-Wesley


"Wester" wrote:

Hi,

Struggling with the command/macro to copy all sheet names in my workbook to
single column on a 'master' sheet.

Any help would be apprecieted.

-Wesley

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,173
Default Copy Sheet Names to a Column

Wester

Worksheets("Sheet1").Activate

But bear in mind in most cases to work on a sheet you don't need to select
it, I always assign a variable to it first to stop having to use the full
qualifier each time. This is also safer to ensure your code works in the
correct range. (By default it also ensures you get an intellisense list of
objects and methods, which is handy

So

Sub test()
Dim wks As Worksheet
Set wks = Worksheets("Sheet3")
With wks
.Range("A1").Value = "Nick did this"
.Columns(1).AutoFit
.Name = "Nicks Sheet"
.PageSetup.LeftFooter = "My Left Foot"
End With
End Sub

Does all you want without selecting or activating. (Any selection or
activation takes time and needs you to stop the screen flashing with
application.screenupdating=false)

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Wester" wrote in message
...
Disregard 1st question, I found the solution in another post.

New question and pretty simple one (but not for me... Krikee). How do I
jump to or select a specific sheet in my workbook so my macro will always
run
on that one sheet.

Sheets("Code Master").Activate
Sheets("Code Master").Select

Any help would be appreciated.

Thanks!

-Wesley


"Wester" wrote:

Hi,

Struggling with the command/macro to copy all sheet names in my workbook
to
single column on a 'master' sheet.

Any help would be apprecieted.

-Wesley


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
copy all sheet tab names of a file in a cell MA Excel Discussion (Misc queries) 4 September 10th 09 01:14 PM
Macro - Copy Table Column & Row Names When Codition Is Met steven.holloway Excel Discussion (Misc queries) 2 December 19th 07 04:08 PM
copy column and header names from existing spreadsheet to new spre lbierer New Users to Excel 2 July 15th 06 04:31 PM
Get other sheet names into a column Keyser Excel Worksheet Functions 2 August 27th 05 02:02 AM
how do i print a column containing 150 names on 1 sheet of paper . stormey Excel Discussion (Misc queries) 3 February 10th 05 05:01 AM


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