Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can someone provide me some code that would check to see if the sheet name "Report" is in the active workbook and if not add it to the end of the sheets, please?
TIA, AlanN |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Alan,
Try something like Dim N As Long On Error Resume Next With ThisWorkbook.Worksheets N = Len(.Item("Report").Name) If N = 0 Then .Add(after:=.Item(.Count)).Name = "Report" End If End With -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "AlanN" wrote in message ... Can someone provide me some code that would check to see if the sheet name "Report" is in the active workbook and if not add it to the end of the sheets, please? TIA, AlanN |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I tried putting that
Thanks for the macro, Chip. I changed ThisWorkbook to ActiveWorkbook as it is run from my personal.xls file. It works like a charm. AlanN "Chip Pearson" wrote in message ... Alan, Try something like Dim N As Long On Error Resume Next With ThisWorkbook.Worksheets N = Len(.Item("Report").Name) If N = 0 Then .Add(after:=.Item(.Count)).Name = "Report" End If End With -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "AlanN" wrote in message ... Can someone provide me some code that would check to see if the sheet name "Report" is in the active workbook and if not add it to the end of the sheets, please? TIA, AlanN |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
backing up formulas in sheet coding? | Excel Discussion (Misc queries) | |||
work sheet coding | Excel Discussion (Misc queries) | |||
Check Activesheet for chart sheet or work sheet | Charts and Charting in Excel | |||
Enable check box in protected sheet + group check boxes | Excel Discussion (Misc queries) | |||
how to use sumif function to check date in 1 sheet is < 2 sheet | Excel Worksheet Functions |