I have an Excel workbook (BAMinit) code as attached
It's purpose is to retrieve all of the worksheet names from another workbook (Bet Angel Multiple)
then populate column A in BAMinit with these sheet names then go and initialise each of the retrieved sheets in Bet Angel Multiple
Used to WORK LIKE A CHARM but has suddenly thrown an error when it gets to the THIRD sheet name when using Sheet.Name in the loop of all sheet names in Bet Angel Multiple
Section of code (part of fully attached ) is:
'Capture Sheet names and define formula to see if it should be initialised
For xLoop = 1 To xCount
xSheet = Sheets(xLoop).Name
ThisWorkbook.Activate
Range("A" & xLoop + 4) = xSheet
xWbk.Activate
Next xLoop
Have explored all options but with no result
Any help much appreciated
Thanks
BazzaBit
Bookmarks