Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default replacing a range with a variable?


I was wanting to allow the user to specify a cell or range from an inpu
box on a form. I then wanted to use that information to specify wher
to start an autofill statement.
example

12/1/2003 (user input DATE would be the label)
1/1/2004 (' ' PATTERN ' 'l)
A1 (' ' STARTING CELL ' ')

code...

....
Range(mycell:mycell+1).AutoFill ActiveCell Range(mycell:lastCell)
xlFillFormats And xlFillSeries
....

I basicly want to replace the ...Range(*"A1:B1"*)....with
variable(s).

Thanks for any help..

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com

~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 391
Default replacing a range with a variable?

use th eapplication InputBox, not the VB one, as this
allows you to specify the input type as a range - see
Help on InputBox


Dim rRange As Range
Set rRange = Application.InputBox("Select Target", "Get
Range", , , , , , 8)

8 is the Range type

Patrick Molloy
Microsoft Excel MVP


-----Original Message-----

I was wanting to allow the user to specify a cell or

range from an input
box on a form. I then wanted to use that information to

specify where
to start an autofill statement.
example

12/1/2003 (user input DATE would be the label)
1/1/2004 (' ' PATTERN ' 'l)
A1 (' ' STARTING CELL ' ')

code...

....
Range(mycell:mycell+1).AutoFill ActiveCell Range

(mycell:lastCell),
xlFillFormats And xlFillSeries
....

I basicly want to replace the ...Range

(*"A1:B1"*)....with a
variable(s).

Thanks for any help...


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from

http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by

step guide to creating financial statements
.

Reply
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
replacing a range of numbers sg Excel Worksheet Functions 3 August 14th 08 01:45 PM
Macro - Fixed text code needs replacing with variable text steven.holloway Excel Discussion (Misc queries) 3 July 22nd 08 03:57 PM
Replacing a Range of Numbers Peter Herman Excel Worksheet Functions 1 July 10th 08 10:30 PM
Replacing Range Names Jim May Excel Discussion (Misc queries) 2 October 25th 06 12:54 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:11 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"