Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
How do I select a sheet without using the sheet name? This is the macro I have at present:- Sub ImportCosts() ' ' ImportCosts Macro ' Macro recorded 16/10/2006 by Administrator ' ' Range("A2:J2").Select Range(Selection, Selection.End(xlDown)).Select Selection.ClearContents Windows("Worksheet in Basis (1)").Activate Range("A2:J2").Select Range(Selection, Selection.End(xlDown)).Select Selection.Copy Windows("Year End Accounts - JANMIC.xls").Activate Range("A2").Select ActiveSheet.Paste As this spreadsheet will be used over and over how do I get the spreadsheet name to change with it in the macro. The variable bit of the above being: "Year End Accounts - JANMIC" I presume I would need a bit of VB that would write the fle name somewhere, then use this as my reference for the above? If so, how do I do this? Thanks in advance Matthew Balch |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Calculate active sheet on sheet selection | Excel Programming | |||
Selection from list on main sheet from suplemental sheet in same w | New Users to Excel | |||
Action on sheet Selection | Excel Programming | |||
Sheet selection | Excel Programming | |||
Inserting a row in sheet A should Insert a row in sheet B, removing a row in Sheet A should remove the corresponding row in sheet B | Excel Programming |