LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 434
Default using formula =sum('*'!A1) in a macro does not work.

hi, TG !

I am trying to use the formula above in a macro that is ran once a button is clicked.
the problem is that the formula goes from =sum('*'!A1) to =sum('*''!A1'), this results in an error message (#NAME)
does anyone know why this is happening when it is used in a macro?
If i use this in a cell and type it myself it works great!


I'm not sure "how" do you use the sintax in your vba-code (?)
I used like this in immediate code-pane and it is working "as expected"...

activecell.formula = "=sum('*'!a1)"

resulting formula includes every [A1] cell in all worksheets in workbook (BUT activesheet)

hth,
hector.


 
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
Macro to update a column in a work based on another work sheet WickerMan New Users to Excel 1 December 4th 09 12:58 PM
If I have a work sheet protected and try to run a macro to hide rows or columns it won't work. Correct? Marc Excel Programming 2 July 12th 06 04:10 AM
Can a macro be made to work based on a formula? lonnied Excel Discussion (Misc queries) 2 January 26th 05 04:00 AM
Can a macro be made to work based on a formula? lonnied Excel Discussion (Misc queries) 0 January 26th 05 02:59 AM
formula does not work in macro mary Excel Programming 1 January 18th 04 02:32 AM


All times are GMT +1. The time now is 02:25 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"