Help! The follwoing code gives me an Automation error message, that I think is because the Sheet name contains an apostrophe. The sheet name is shown in []. Any help, like how to delete the offending characters and still have the correct formula reference will be greatly appreciated.
For ss = 1 To SheetCount 'SheetCount is the number of sheets
ll = ss + 1
zz5 = Row_A(ss)
Wkbk1.Worksheets("Summary").Cells(ll, 1).Value = SheetNames(ss)
fstring = SheetNames(ss) '[SIDE EXTENSION (1'-6")] - bad sheet name causing the error
fstring = Chr(61) & Chr(39) & fstring & Chr(39) & "!L" & zz5
Wkbk1.Worksheets("Summary").Cells(ll, 5).Formula = fstring
Next ss
For ss = 1 To SheetCount 'SheetCount is the number of sheets
ll = ss + 1
zz5 = Row_A(ss)
Wkbk1.Worksheets("Summary").Cells(ll, 1).Value = SheetNames(ss)
fstring = SheetNames(ss) '[SIDE EXTENSION (1'-6")] - bad sheet name causing the error
fstring = Chr(61) & Chr(39) & fstring & Chr(39) & "!L" & zz5
Wkbk1.Worksheets("Summary").Cells(ll, 5).Formula = fstring
Next ss