Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
replacing a range of numbers | Excel Worksheet Functions | |||
Macro - Fixed text code needs replacing with variable text | Excel Discussion (Misc queries) | |||
Replacing a Range of Numbers | Excel Worksheet Functions | |||
Replacing Range Names | Excel Discussion (Misc queries) | |||
Problem trying to us a range variable as an array variable | Excel Programming |