Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
With wksNew
ActiveSheet.PageSetup.PrintArea = r.Address .Name = Left(Trim(currCat), 31) 'this line is where I need to expand ActiveSheet.Calculate .Cells.Copy .Cells.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False application.CutCopyMode = False End With When the above code is running, occasionally the macro will get stuck because the currCat name contains a character, such as a slash, that Excel cannot use in a sheet name. Can someone tell me how to write code that will either strip out invalid sheet name characters or replace them with something like a dash? -- Thanks, PTweety |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
naming sheets | Excel Programming | |||
Avoiding verbose code | Excel Programming | |||
Shorten code to apply to all sheets except a few, instead of individually naming them, and later adding to code. | Excel Programming | |||
Avoiding page breaks across merged cells - Code not working as expected | Excel Programming | |||
Avoiding 400 Error code | Excel Programming |