Question : Error message when execute Macro

Hi Experts,

I need Experts help. When I run Macro2 “Sub CompileData()”, the error message pop-up as:

“subscript out of range” at this line:

“If ISEXIST(Sheets(CStr(wksName)).UsedRange.Columns("a:b").Value, MySheets(i) & ";" & CLng(rCell”

Hope Experts could help me to rectify this error. Attached the workbook for Experts perusal.


Attachments:
 
 

Answer : Error message when execute Macro

Hi,

replace

Sheets(CStr(wksName))

with

Sheets(CStr(Trim(wksName)))

wherever in the code

Kris
Random Solutions  
 
programming4us programming4us