Is there a way that you can put a variable instead of "book1" in the
Workbooks("book1").Worksheets("sheet1").Range("a1") statement?
Is there a way that you can put a variable instead of "book1" in the
Workbooks("book1").Worksheets("sheet1").Range("a1") statement?
Hi Luc
Try this
Dim wb As Workbook
Set wb = Workbooks("Book1.xls")
wb.Sheets("Sheet1").Range("a1").Select
change Set wb = Workbooks("Book1.xls")
--
Regards Ron de Bruin
http://www.rondebruin.nl
"Luc" <[email protected]> wrote in message news:[email protected]...
> Is there a way that you can put a variable instead of "book1" in the
> Workbooks("book1").Worksheets("sheet1").Range("a1") statement?
dim strBook as string
strBook = "book1"
Workbooks(strBook ).Worksheets("sheet1").Range("a1")
--
HTH...
Jim Thomlinson
"Luc" wrote:
> Is there a way that you can put a variable instead of "book1" in the
> Workbooks("book1").Worksheets("sheet1").Range("a1") statement?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks