Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
worksheets
hi,
Kevin has posted for me the following code in which "HYPERLINK" is a subRoutine.the code cycles thru all the worksheets.I wanna know if there is any way to get the procedure cycle only thru the first 3 worksheets.the first three worksheets have different names? Private Sub CommandButton18_Click() Dim ws as Worksheet For Each ws in ThisWorkBook.Worksheets ws.Activate HYPERLINK Next ws end sub thanx. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
worksheets
Private Sub CommandButton18_Click()
dim wCtr as long for wctr = 1 to 3 worksheets(wctr).Activate myHYPERLINK Next wctr end sub ps. I don't think I'd use Hyperlink as a name as a subroutine. peyman wrote: hi, Kevin has posted for me the following code in which "HYPERLINK" is a subRoutine.the code cycles thru all the worksheets.I wanna know if there is any way to get the procedure cycle only thru the first 3 worksheets.the first three worksheets have different names? Private Sub CommandButton18_Click() Dim ws as Worksheet For Each ws in ThisWorkBook.Worksheets ws.Activate HYPERLINK Next ws end sub thanx. -- Dave Peterson |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
worksheets
Just SHIFT + click to select the sheets then run
Private Sub CommandButton18_Click() Dim ws as Worksheet For Each ws in ActiveWindow.SelectedSheets ws.Activate HYPERLINK Next ws End sub Gord Dibben MS Excel MVP On Thu, 11 Oct 2007 09:15:07 -0700, peyman wrote: hi, Kevin has posted for me the following code in which "HYPERLINK" is a subRoutine.the code cycles thru all the worksheets.I wanna know if there is any way to get the procedure cycle only thru the first 3 worksheets.the first three worksheets have different names? Private Sub CommandButton18_Click() Dim ws as Worksheet For Each ws in ThisWorkBook.Worksheets ws.Activate HYPERLINK Next ws end sub thanx. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
worksheets
thanx Dave.
"Dave Peterson" wrote: Private Sub CommandButton18_Click() dim wCtr as long for wctr = 1 to 3 worksheets(wctr).Activate myHYPERLINK Next wctr end sub ps. I don't think I'd use Hyperlink as a name as a subroutine. peyman wrote: hi, Kevin has posted for me the following code in which "HYPERLINK" is a subRoutine.the code cycles thru all the worksheets.I wanna know if there is any way to get the procedure cycle only thru the first 3 worksheets.the first three worksheets have different names? Private Sub CommandButton18_Click() Dim ws as Worksheet For Each ws in ThisWorkBook.Worksheets ws.Activate HYPERLINK Next ws end sub thanx. -- Dave Peterson |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
worksheets
thank you Gord,but I'd prefer to handle it without the SHIFT + click .thanx
anyway. "Gord Dibben" wrote: Just SHIFT + click to select the sheets then run Private Sub CommandButton18_Click() Dim ws as Worksheet For Each ws in ActiveWindow.SelectedSheets ws.Activate HYPERLINK Next ws End sub Gord Dibben MS Excel MVP On Thu, 11 Oct 2007 09:15:07 -0700, peyman wrote: hi, Kevin has posted for me the following code in which "HYPERLINK" is a subRoutine.the code cycles thru all the worksheets.I wanna know if there is any way to get the procedure cycle only thru the first 3 worksheets.the first three worksheets have different names? Private Sub CommandButton18_Click() Dim ws as Worksheet For Each ws in ThisWorkBook.Worksheets ws.Activate HYPERLINK Next ws end sub thanx. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How use info in Excel shared worksheets to create new worksheets | Excel Worksheet Functions | |||
how do i copy a cell in worksheets 10 to the other 9 worksheets | New Users to Excel | |||
Worksheets | Excel Discussion (Misc queries) | |||
How do i assign the ActiveWorkbook.Worksheets to a worksheets object? | Excel Worksheet Functions | |||
Assigning Cells in worksheets to other data in other worksheets. | Excel Discussion (Misc queries) |