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: 5
Default Make Variable Range in VBA

Hi Excel Gurus,

I want to change this hard coding macro with variable:

Sub test()
Range("I2").Select
Selection.Copy
Workbooks.Add
ActiveSheet.Paste
Application.CutCopyMode = False
ChDir _"C:\Documents and Settings\Jeffry Husman\My Documents\Excel
Workbook\Macro Exercise"
ActiveWorkbook.SaveAs Filename:= _"C:\Documents and Settings\Jeffry
Husman\My Documents\Excel Workbook\Macro Exercise\jeff1.xls" _,
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
ActiveWindow.Close

I want to be able to make the range add automatically from range (I2) up to
Range (I500) and save the file name with jeff1 up to jeff500.

Thanks in advance




 
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
Help make a macro variable Brad Excel Discussion (Misc queries) 3 March 10th 08 07:58 PM
Trying to make Date Range variable in VBA SQL Query Tim French Excel Programming 1 September 14th 06 06:31 PM
'ActiveWorkbook.Names.Add Name:' how to make range variable? TeeSea Excel Programming 1 June 9th 05 03:42 PM
setting a range variable equal to the value of a string variable Pilgrim Excel Programming 2 July 1st 04 11:32 PM
Problem trying to us a range variable as an array variable TBA[_2_] Excel Programming 4 September 27th 03 02:56 PM


All times are GMT +1. The time now is 05:07 PM.

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"