Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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
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
Application.InputBox Steven Excel Programming 2 December 23rd 06 11:56 PM
application.inputbox Christmas May[_2_] Excel Programming 5 November 22nd 06 04:11 PM
Inputbox and Application.InputBox Maria[_7_] Excel Programming 1 September 20th 04 11:36 AM
inputbox and application.run macro1 Michael Joe Excel Programming 3 August 13th 04 09:34 PM
application.inputbox Murat Excel Programming 4 February 24th 04 11:38 AM


All times are GMT +1. The time now is 11:02 PM.

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"