Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the Following Code. I understand it is not optimized, the
question is how do i place the captured tab name in the formula. what I am trying is not working. Public Sub Tester001() Dim strClickedSht As String Dim TabName As String Sheets("Unit 2 Week 2 Test Standards An").Select strClickedSht = ActiveSheet.Name TabName = strClickedSht MsgBox TabName 'for testing Sheets("Standard Analysis").Select Range("A6").Select ActiveCell.FormulaR1C1 = "=('TabName'!R[2]C)" End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi Ardy,
ActiveCell.FormulaR1C1 = "=('" & TabName & "'!R[2]C)" or ActiveCell.Formula = "=('" & TabName & "'!A8)" -- isabelle Le 2011-12-12 17:22, Ardy a écrit : I have the Following Code. I understand it is not optimized, the question is how do i place the captured tab name in the formula. what I am trying is not working. Public Sub Tester001() Dim strClickedSht As String Dim TabName As String Sheets("Unit 2 Week 2 Test Standards An").Select strClickedSht = ActiveSheet.Name TabName = strClickedSht MsgBox TabName 'for testing Sheets("Standard Analysis").Select Range("A6").Select ActiveCell.FormulaR1C1 = "=('TabName'!R[2]C)" End Sub |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank You.
|
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
?Optimized...
Public Sub Tester001() Const TabName As String = "Unit 2 Week 2 Test Standards An" Sheets("Standard Analysis").Range("A6").FormulaR1C1 = _ "=('" & TabName & "'!R[2]C)" End Sub -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
...or this one-liner:
Public Sub Tester001() Sheets("Standard Analysis").Range("A6").FormulaR1C1 = _ "=('Unit 2 Week 2 Test Standards An'!R[2]C)" End Sub -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
formula's | Excel Discussion (Misc queries) | |||
Storing variables in a macro and using those variables to performcalculations. | Excel Programming | |||
can excel automatically collect variables to redue a formula's si. | Excel Discussion (Misc queries) | |||
Insert dummy variables | Excel Programming | |||
Need Help w/Formula's | Excel Worksheet Functions |