Cell Value to String?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to get a string from a cell value so that I can use indirect to
reference tabs. The tab names are in a column in tab "User Guide". I used the
code:
Dim tabName(0 To numWS - 1) As String
tabName(0) = Worksheets("User Guide").Cells("E8").Value
Whenever I try to run the macro. i get a "type mismatch" error. Can someone
help me out?
 
1. I don't see where numWS is set
2. use Range("E8") and not Cells("E8")
 
Thanks. Changing Cells() to Range() did the trick. I wonder why cells() can't
accept string values. I don't seem to have problem with numeric values.
 
Changing Cells to Range did the trick. I wonder why Cells() won't work.
 

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

Back
Top