In a userform I want to display cell values in a label. This code gives me a
subscript out of range.
label1.caption = workbooks("myworkbook.xls") .worksheets(1).range("a1)
In a userform I want to display cell values in a label. This code gives me a
subscript out of range.
label1.caption = workbooks("myworkbook.xls") .worksheets(1).range("a1)
label1.caption = workbooks("myworkbook.xls")
..worksheets(1).range("a1").Value
If it still gives you that error message, you don't have a workbook open
named Myworkbook.xls
--
Regards,
Tom Ogilvy
"Rbp9ad" <rob.patterson@lightcore.net> wrote in message
news:Ofha$jj5FHA.1032@TK2MSFTNGP11.phx.gbl...
> In a userform I want to display cell values in a label. This code gives me
a
> subscript out of range.
>
> label1.caption = workbooks("myworkbook.xls") .worksheets(1).range("a1)
>
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks