LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default Sheet Selection without using the sheet name

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
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
Calculate active sheet on sheet selection a94andwi[_11_] Excel Programming 1 September 26th 05 05:23 PM
Selection from list on main sheet from suplemental sheet in same w Kelly New Users to Excel 1 August 12th 05 04:37 PM
Action on sheet Selection jpizzle[_8_] Excel Programming 4 June 13th 05 05:33 PM
Sheet selection No Name Excel Programming 1 October 6th 04 05:02 PM
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 Hannes Heckner Excel Programming 1 March 5th 04 09:10 AM


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