Hi friends
In programming sense each object has 2 identifier
1st one is name (accessible to programmer only)
2nd one is caption ( which user see)
say u put one command button mentioning click me
so command1 will be name & click me will be caption
same way in excel sheet name june
so we can use
[VBA]sheet1.select
or
sheets("June").select[/VBA]
the difference is if we use 2nd code our macro throws error if someone changes name of sheet june to july or whatever
but if we use first line then irrespective of sheet name our code will work
if u are clear than i start with my problem (the above explanation was to differenctiate name & caption property)
now can the same differentitaion can be applicable in vba formula
like my recorded macro line is
[VBA]
Sheets("Summ").Select
Range("R2").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-17],Deliveries!C1:C17,10,0)"[/VBA]
now in above code I want modification as
[VBA]
' the below lines makes me tension free now user can change name
Sheet1.select' Sheets("Summ").Select
Range("R2").Select
' now pl tell me code for the below line as if user changes sheet name Deliveries than my macro gets stuck over that
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-17],Deliveries!C1:C17,10,0)"[/VBA]
there is any way by which i can substitute Sheet Caption Deliveries with its programming code like sheet3
so that user change the name from deliveries to say XYZ but my code will run properly