Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 113
Default Multi Sheet Macro

I have a Workbook with 20 individual sheets. Each Sheet
has two Buttons. One is a clear the other is a Clear all
Sheets. The Clear All basicly selects all the sheets and
runs the clear button.

Sheets (Array("sheet 1", sheet 2", etc, "Sheet 20")).Select

what I want to do to reduce code and file size is
something like:

Sheets(Array("Tech 1:Tech 25")).Select

but I can't get that to work. Suggestions??
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Multi Sheet Macro

Sheets.Select

That will select all of them.

Cheers,

Jeff

"Dan" wrote in message
...
I have a Workbook with 20 individual sheets. Each Sheet
has two Buttons. One is a clear the other is a Clear all
Sheets. The Clear All basicly selects all the sheets and
runs the clear button.

Sheets (Array("sheet 1", sheet 2", etc, "Sheet 20")).Select

what I want to do to reduce code and file size is
something like:

Sheets(Array("Tech 1:Tech 25")).Select

but I can't get that to work. Suggestions??



  #3   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 113
Default Multi Sheet Macro

Sheets.select("Sheet 1:Sheet 20") doesn't work

Sheets ("Sheet 1:Sheet 20").Select doesn't work

sheet (Array( ... nothing

Sheet.Select (Array( ... nada

Errors out

-----Original Message-----
Sheets.Select

That will select all of them.

Cheers,

Jeff

"Dan" wrote in

message
...
I have a Workbook with 20 individual sheets. Each Sheet
has two Buttons. One is a clear the other is a Clear all
Sheets. The Clear All basicly selects all the sheets and
runs the clear button.

Sheets (Array("sheet 1", sheet 2", etc, "Sheet

20")).Select

what I want to do to reduce code and file size is
something like:

Sheets(Array("Tech 1:Tech 25")).Select

but I can't get that to work. Suggestions??



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 618
Default Multi Sheet Macro

Hi Dan

Jeff's solution does work - it's just

sheets.select

nothing else

Cheers
JulieD

"Dan" wrote in message
...
Sheets.select("Sheet 1:Sheet 20") doesn't work

Sheets ("Sheet 1:Sheet 20").Select doesn't work

sheet (Array( ... nothing

Sheet.Select (Array( ... nada

Errors out

-----Original Message-----
Sheets.Select

That will select all of them.

Cheers,

Jeff

"Dan" wrote in

message
...
I have a Workbook with 20 individual sheets. Each Sheet
has two Buttons. One is a clear the other is a Clear all
Sheets. The Clear All basicly selects all the sheets and
runs the clear button.

Sheets (Array("sheet 1", sheet 2", etc, "Sheet

20")).Select

what I want to do to reduce code and file size is
something like:

Sheets(Array("Tech 1:Tech 25")).Select

but I can't get that to work. Suggestions??



.



  #5   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Multi Sheet Macro

AAAAAAAAAAAaaahhhhhhhhhhhhhhhhhhhhhhhhh!!! *light goes on*

Thanks
-----Original Message-----
Hi Dan

Jeff's solution does work - it's just

sheets.select

nothing else

Cheers
JulieD

"Dan" wrote in

message
...
Sheets.select("Sheet 1:Sheet 20") doesn't work

Sheets ("Sheet 1:Sheet 20").Select doesn't work

sheet (Array( ... nothing

Sheet.Select (Array( ... nada

Errors out

-----Original Message-----
Sheets.Select

That will select all of them.

Cheers,

Jeff

"Dan" wrote in

message
...
I have a Workbook with 20 individual sheets. Each

Sheet
has two Buttons. One is a clear the other is a Clear

all
Sheets. The Clear All basicly selects all the sheets

and
runs the clear button.

Sheets (Array("sheet 1", sheet 2", etc, "Sheet

20")).Select

what I want to do to reduce code and file size is
something like:

Sheets(Array("Tech 1:Tech 25")).Select

but I can't get that to work. Suggestions??


.



.



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
Excel 2007-macro enabled, multi-sheet opening in minimized mode LT Excel Discussion (Misc queries) 0 March 11th 10 05:36 PM
Why does a Multi-sheet/user file open on sheet two every time? Frustrated in NJ Excel Discussion (Misc queries) 1 January 22nd 10 05:46 PM
countif in multi sheet ghost Excel Discussion (Misc queries) 7 November 17th 08 11:29 AM
Help with multi sheet workbook Sportinus Excel Worksheet Functions 2 July 10th 08 01:41 PM
Multi-sheet linking Abir Excel Programming 1 October 3rd 03 08:18 AM


All times are GMT +1. The time now is 12:28 AM.

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"