cell values as label captions

R

Rbp9ad

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)
 
T

Tom Ogilvy

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top