Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
identify selected worksheets
probably very simple, but I can't quite work it out.
If more than one worksheet is selected, the code for whis action would be: Sheets(Array("Sheet1", "Sheet2")).Select how do i access this information. (I would like to apply changes to Sheet1 and Sheet2, and not to Sheet3) thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
identify selected worksheets
Code acts on only one sheet at a time. If you want to update multiple sheets
you need to write code traverse through those sheets individually. -- HTH... Jim Thomlinson "brzak" wrote: probably very simple, but I can't quite work it out. If more than one worksheet is selected, the code for whis action would be: Sheets(Array("Sheet1", "Sheet2")).Select how do i access this information. (I would like to apply changes to Sheet1 and Sheet2, and not to Sheet3) thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
identify selected worksheets
Thanks, though my question was how to work out which sheets are
selected. i.e. how do I work out which sheets to traverse? I can't do this for example: Dim A as Worksheet For Each A in Selection 'Actions Next A Cheers On Jun 23, 4:31*pm, Jim Thomlinson <James_Thomlin...@owfg-Re-Move- This-.com wrote: Code acts on only one sheet at a time. If you want to update multiple sheets you need to write code traverse through those sheets individually. -- HTH... Jim Thomlinson "brzak" wrote: probably very simple, but I can't quite work it out. If more than one worksheet is selected, the code for whis action would be: * * * Sheets(Array("Sheet1", "Sheet2")).Select how do i access this information. (I would like to apply changes to Sheet1 and Sheet2, and not to Sheet3) thanks |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
identify selected worksheets
Dim sh As Object
For Each sh In ActiveWindow.SelectedSheets MsgBox sh.Name Next sh -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "brzak" wrote in message ... Thanks, though my question was how to work out which sheets are selected. i.e. how do I work out which sheets to traverse? I can't do this for example: Dim A as Worksheet For Each A in Selection 'Actions Next A Cheers On Jun 23, 4:31 pm, Jim Thomlinson <James_Thomlin...@owfg-Re-Move- This-.com wrote: Code acts on only one sheet at a time. If you want to update multiple sheets you need to write code traverse through those sheets individually. -- HTH... Jim Thomlinson "brzak" wrote: probably very simple, but I can't quite work it out. If more than one worksheet is selected, the code for whis action would be: Sheets(Array("Sheet1", "Sheet2")).Select how do i access this information. (I would like to apply changes to Sheet1 and Sheet2, and not to Sheet3) thanks |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
identify selected worksheets
Sub which_ones()
For i = 1 To ActiveWindow.SelectedSheets.Count MsgBox (ActiveWindow.SelectedSheets(i).Name) Next End Sub -- Gary''s Student - gsnu200793 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
identify selected worksheets
Ah great, I didn't think to use ActiveWindow, I looked down the full
list of Worksheet/Sheet object members (at least three times) but found nothing. I'll have to keep ActiveWindow in mind for the future - seems to have a lot of useful properties. Thanks guys! On Jun 23, 5:14*pm, Gary''s Student wrote: Sub which_ones() For i = 1 To ActiveWindow.SelectedSheets.Count * * MsgBox (ActiveWindow.SelectedSheets(i).Name) Next End Sub -- Gary''s Student - gsnu200793 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cross reference two worksheets to identify matches | Excel Worksheet Functions | |||
Identify selected chart | Excel Programming | |||
Need to identify object selected. | Excel Programming | |||
Identify User Selected Range | Excel Programming | |||
Identify Range Selected By User | Excel Programming |