looking for some solutions? You are welcome.

SOLVED: Confusion between Sheet and Sheets(Name) in Excel VBA [duplicate]

jeake:

This question already has an answer here:

I have a VBA code in wbindex that:

  1. open workbook wbresults
  2. get a value from wbresults
  3. save the value in wbindex

This specific line gets an Error 438: object doesn't support this property or method

wbindex.Sheet2.Range("A" & j).Value = wbresults.Sheets("Couverture").Range("F2").Value

But this one does not

wbindex.Sheets("2 - LISTE").Range("A" & j).Value = wbresults.Sheets("Couverture").Range("F2").Value

Also wbresults was saved from a Microsoft Office in French, while mine is in English.

And Worksheets(2) does not produce an error but the data is not recorded in wbindex.

Can someone please explain the issue with the first line ?



Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
Share:

No comments:

Recent