Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ren Ren is offline
external usenet poster
 
Posts: 67
Default Cell Value to String?

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?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Cell Value to String?

1. I don't see where numWS is set
2. use Range("E8") and not Cells("E8")
--
Gary''s Student - gsnu200755
  #3   Report Post  
Posted to microsoft.public.excel.programming
Ren Ren is offline
external usenet poster
 
Posts: 67
Default Cell Value to String?

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.

"Gary''s Student" wrote:

1. I don't see where numWS is set
2. use Range("E8") and not Cells("E8")
--
Gary''s Student - gsnu200755

  #4   Report Post  
Posted to microsoft.public.excel.programming
Ren Ren is offline
external usenet poster
 
Posts: 67
Default Cell Value to String?

Changing Cells to Range did the trick. I wonder why Cells() won't work.

"Gary''s Student" wrote:

1. I don't see where numWS is set
2. use Range("E8") and not Cells("E8")
--
Gary''s Student - gsnu200755

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
word match in string text in cell, color format cell jpmahony Excel Discussion (Misc queries) 1 October 31st 07 03:56 PM
FIND / SEARCH text compare cell to string in 3rd cell nastech Excel Discussion (Misc queries) 0 October 29th 07 02:51 AM
Compare text string of a cell in Column A VS another cell in Colum Tan Excel Programming 0 July 30th 07 05:12 PM
A Macro to replace a string in a cell with a string from another cell??? Plica05 Excel Programming 2 August 16th 05 09:23 AM
Create a formula into a String then assign string to a cell Myrna Larson[_2_] Excel Programming 6 August 23rd 03 09:42 PM


All times are GMT +1. The time now is 12:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"