Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all, I have button on sheet which have macro allocated (see below)
Sub addsht () Sheets.Add After:=Sheets(Sheets.Count) With ActiveSheet ..Name = "EXTRACTED DATA" End With End Sub The problem is that when I press this button once it works fine but when I press it again it gives error on ..Name = "EXTRACTED DATA" what code line I can add so that when I press the button it give sheets name like "EXTRACTED DATA (1) , EXTRACTED DATA (2) and so on. in other words keeping the same name but adding 1 , 2 , 3..... in the end. Please can any friend can help |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Needle in a haystack...searching for VBA code in all Excel sheets orfinding xls users of xla sheets.... | Excel Programming | |||
Print sheets by "All Sheets in workbook, EXCEPT for specific named sheets". Possible? | Excel Programming | |||
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 |