Excel VBA can't open Workbook

后端 未结 7 1695
有刺的猬
有刺的猬 2020-12-11 07:48

First: I\'m using Excel 2007, but the code has to work for Excel 2003 as well.

My problem is the following: I need to access cells in a different workbook, which may

7条回答
  •  长情又很酷
    2020-12-11 08:00

    You don't have to "Set" a cell, It's part of the workbook class (as far as I know). Just use the following...

    foo = wbk.Worksheets("Sheet1").Range("A1").Value
    

提交回复
热议问题