Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with Application.InputBox(,,,,,8)
Hi,
I'm using Application.InputBox(,,,,,8) in my Excel vsto AddIn to retrieve a Range. However, I need help getting the exact reference text. Eg, selecting a range, then hitting F4 to turn it to A$1 instead of $A$1. I'm trying to get A$1, but the only way that I can think of to get the address is via range.get_Address, which returns me $A$1 format instead of A$1. Please help. Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with Application.InputBox(,,,,,8)
I don't know what is range.get_Address, but if your currently selected cell
is A1 then selection.address(true,false) returns A$1. Regards, Stefi JsJ_Slim ezt *rta: Hi, I'm using Application.InputBox(,,,,,8) in my Excel vsto AddIn to retrieve a Range. However, I need help getting the exact reference text. Eg, selecting a range, then hitting F4 to turn it to A$1 instead of $A$1. I'm trying to get A$1, but the only way that I can think of to get the address is via range.get_Address, which returns me $A$1 format instead of A$1. Please help. Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with Application.InputBox(,,,,,8)
range.get_Address(true,false)
-- __________________________________ HTH Bob "JsJ_Slim" wrote in message ... Hi, I'm using Application.InputBox(,,,,,8) in my Excel vsto AddIn to retrieve a Range. However, I need help getting the exact reference text. Eg, selecting a range, then hitting F4 to turn it to A$1 instead of $A$1. I'm trying to get A$1, but the only way that I can think of to get the address is via range.get_Address, which returns me $A$1 format instead of A$1. Please help. Thanks |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with Application.InputBox(,,,,,8)
Hi Bob and Stefi
Thanks for the reply. range.get_Address(true, false) worked, but only if I know if I know whether the row (and/or) column is absolute/relative. Basically, I'm calling Application.InputBox(,,,,8) such that the user can select a range from the spreadsheet, during which they may use F4 to dictate if the row/column is absolute/relative. At the end, a Range object is returned. What I need is to transform this returned range into the *exact* same reference that appeared in the refedit box (eg, =$A$1, or =A$1 or =$A1, etc). An example of its usage: I have an Excel addin that uses the Application.Input() to allow the user to select a range. Having got that, the addin will then insert a formula (including the range reference) into the spreadsheet. And assume that one of the requirements is that the included range reference must appear *exactly* like what the user specified (absolute row (or/and) column)in the Application.Input(). Hence, if the user selected $A1 in Application.Input(), the formula must show $A1; if the user selected A$1, then it must appear as A$1, etc. Sorry if I'm making things confusing. If you need any further clarifications/examples, please let me know. Thanks! "Bob Phillips" wrote: range.get_Address(true,false) -- __________________________________ HTH Bob "JsJ_Slim" wrote in message ... Hi, I'm using Application.InputBox(,,,,,8) in my Excel vsto AddIn to retrieve a Range. However, I need help getting the exact reference text. Eg, selecting a range, then hitting F4 to turn it to A$1 instead of $A$1. I'm trying to get A$1, but the only way that I can think of to get the address is via range.get_Address, which returns me $A$1 format instead of A$1. Please help. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Application.InputBox | Excel Programming | |||
application.inputbox | Excel Programming | |||
Inputbox and Application.InputBox | Excel Programming | |||
inputbox and application.run macro1 | Excel Programming | |||
application.inputbox | Excel Programming |