I have set variable for active sheet!
Set s = ActiveSheet
I can't get formula work for sheet as a variable
???? ActiveCell.FormulaR1C1 = "=s!R[-20]C[1]" ????
How do i force formula from variable sheet???????
I have set variable for active sheet!
Set s = ActiveSheet
I can't get formula work for sheet as a variable
???? ActiveCell.FormulaR1C1 = "=s!R[-20]C[1]" ????
How do i force formula from variable sheet???????
Last edited by madars; 01-31-2011 at 08:56 AM. Reason: removed repeated ? from title
You could do so:
Regards,![]()
Please Login or Register to view this content.
Antonio
This didn't work... I got syntax error!
This macro runs fine:
In the above code the important is that you use 's' variable to set a worksheet because if you use variable only for the name you need to use this other code:![]()
Please Login or Register to view this content.
Regards,![]()
Please Login or Register to view this content.
Antonio
It works in separate excel but not in this code... Why?
Mod. edit: CODE tags when posting VBA please - per Forum Rules![]()
Please Login or Register to view this content.
Last edited by DonkeyOte; 01-31-2011 at 04:12 AM.
Without looking at your code in detail - when posting references to sheets always wise to encase within '
Please also note my edit to your prior post - any/all VBA should be encased within CODE tags per Forum Rules.![]()
Please Login or Register to view this content.
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
On an aside - when posting formulae to the worksheet it's worth being aware of the fact that VBA is US-centric.
This means the .Formula property assumes US delimiters - if you wish/need to post formulae with delimiters per your own locale use .FormulaLocal property.
If you are satisfied with the solution(s) provided, please mark your thread as Solved.
How to mark a thread Solved
Go to the first post
Click edit
Click Go Advanced
Just below the word Title you will see a dropdown with the word No prefix.
Change to Solved
Click Save
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks