Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I use vb to move from worksheet to worksheet in a workbook.
I am using VB (Excel) and want to be able to move from sheet to sheet in a
macro and finish at the last sheet. Any ideas?? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I use vb to move from worksheet to worksheet in a workbook.
For Each wksht In ActiveWorkbook.Worksheets... HTH, Job "Ed123" wrote in message ... I am using VB (Excel) and want to be able to move from sheet to sheet in a macro and finish at the last sheet. Any ideas?? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I use vb to move from worksheet to worksheet in a workbook.
If you don't need to actually select the sheets, use something
like Dim WS As Worksheet For Each WS In ThisWorkbook.Worksheets ' do something with WS Next WS If you do need to select the sheets, put a Select statement within the loop above: WS.Select -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Ed123" wrote in message ... I am using VB (Excel) and want to be able to move from sheet to sheet in a macro and finish at the last sheet. Any ideas?? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I use vb to move from worksheet to worksheet in a workbook.
With ActiveWorkbook
for each sh in .Worksheets msgbox "in sheet: " & sh.Name & vbNewLine & _ "cell A1: " & sh.Range("A1").Value Next .Worksheets(.Worksheets.count).Select End With -- Regards, Tom Ogilvy "Ed123" wrote in message ... I am using VB (Excel) and want to be able to move from sheet to sheet in a macro and finish at the last sheet. Any ideas?? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
move a worksheet from one workbook to another | Excel Discussion (Misc queries) | |||
Why can't you just Move a worksheet in Excel '07 to new workbook? | Excel Worksheet Functions | |||
Copy/Move Worksheet from one Workbook to another | Excel Discussion (Misc queries) | |||
How do I move the worksheet tabs to the top of the workbook? | Excel Discussion (Misc queries) | |||
command button move worksheet from one workbook to another | Excel Programming |