Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
How I can always add a worksheet to the right of all existing, visible worksheets in a workbook? Thanks. Bill |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Bill,
Try: ============= Public Sub Tester() With ActiveWorkbook .Worksheets.Add After:=.Sheets(.Sheets.Count) End With End Sub '<<============= --- Regards, Norman "Bill" wrote in message k.net... Hello, How I can always add a worksheet to the right of all existing, visible worksheets in a workbook? Thanks. Bill |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Bill,
Adressing the visible criterion, try: '============= Public Sub Tester2() Dim i As Long With ActiveWorkbook For i = .Sheets.Count To 1 Step -1 If .Sheets(i).Visible Then .Worksheets.Add after:=.Sheets(i) Exit For End If Next i End With End Sub '<<============= --- Regards, Norman |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Multiple Sheets (Need to create 500 individual sheets in one workbook, pulling DATA | Excel Worksheet Functions | |||
How to repeat a code for selected sheets (or a contiguous range of sheets) in a Workbook? | Excel Worksheet Functions | |||
How to repeat a code for selected sheets (or a contiguous range of sheets) in a Workbook? | Excel Programming | |||
Macro for filter on protected workbook that works for all sheets, no matter what sheets are named? | Excel Programming | |||
Allocate Files to Sheets and Build a Master Sheet which Summarises All Sheets | Excel Programming |