LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 829
Default Macro adds "=" to each cell in defined range across multiple worksheets

"abbruno" wrote:
I am getting a compile error (For Each control variable
must be variant or object) Can you please tell me what
is wrong and how to fix this?


My bad! Sometimes I forget VBA's subtle foibles.

Fix this problem by changing the type of shName from String to Variant.
That is:

Dim shName As Variant

I did not sanity-check the rest of the code.

 
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
Selecting "Save As" adds "Copy of" to file name- MS Excel 2007 ronhansen Excel Discussion (Misc queries) 1 November 15th 09 09:33 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Worksheets("Sheetname").Select refuses to kick in from User Defined function Michiel via OfficeKB.com Excel Programming 14 February 21st 08 03:40 PM
Cell "A" Adds data to Other Cells joelbeveridge Excel Discussion (Misc queries) 8 August 3rd 06 04:42 AM
use variable in Workbooks("book1").Worksheets("sheet1").Range("a1" Luc[_3_] Excel Programming 2 September 28th 05 08:37 PM


All times are GMT +1. The time now is 04:39 AM.

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"