I have one cell with all sheet name write in this way: "Sheet1", "Sheet2", "Sheet3". So I insert this value in single variable SheetNames as String.
Now, I need to get single sheet name and insert. My code is:
varSheets = Array(FogliArray)
'varSheets = Array("Other", "Research", "IT")
lngShtCnt = 0
On Error Resume Next
For Each varSheet In varSheets
With wkbSource.Worksheets(varSheet)
If I use varSheets = Array("Other", "Research", "IT") all work correctly. But if I use varSheets = Array(FogliArray) where FogliArray is variable that contains all sheet name ("Other", "Research", "IT") not works.
Please, can you help me? Many thanks, Andrea.
Splitand you may have to replace the quotes too.FogliArrayrefers to one cell?