Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Inputbox used to return value of selected cell

Anyone know how I can use the inputbox so that the value of the inputbox is
determined by the cell I select with my mouse?

Donald


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Inputbox used to return value of selected cell

Not exactly what I should have asked.

I'm trying to return the cell address to the input box when I select a cell
with the mouse.

D.S.

Donald
"D.S." wrote in message
...
Anyone know how I can use the inputbox so that the value of the inputbox

is
determined by the cell I select with my mouse?

Donald





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default Inputbox used to return value of selected cell

Donald,

Using Application.Inputbox you can select a cell.

This code sets a cell to that value
myCell = Application.InputBox(prompt:="Select a cell", Type:=8)


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"D.S." wrote in message
...
Anyone know how I can use the inputbox so that the value of the inputbox

is
determined by the cell I select with my mouse?

Donald




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Inputbox used to return value of selected cell

Hi Donald

Not too sure I understand what you're after. But here's an inputbox that
prompts you to click a cell and returns the clicked cell and its address.
Who knows, maybe you need exactly that one day ?

Sub ClickACell()
Dim R As Range
On Error Resume Next
Set R = Application.InputBox("Click a cell:", _
Default:=ActiveCell.Address, _
Type:=8)
If R Is Nothing Then
MsgBox "cluck cluck"
Else
Set R = R(1)
MsgBox R.Address, , "A fine choice!"
End If
End Sub

--
HTH. Best wishes Harald
Followup to newsgroup only please

"D.S." skrev i melding
...
Not exactly what I should have asked.

I'm trying to return the cell address to the input box when I select a

cell
with the mouse.

D.S.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default Inputbox used to return value of selected cell

Donald,

Just tag .Address to the end.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Bob Phillips" wrote in message
...
Donald,

Using Application.Inputbox you can select a cell.

This code sets a cell to that value
myCell = Application.InputBox(prompt:="Select a cell", Type:=8)


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"D.S." wrote in message
...
Anyone know how I can use the inputbox so that the value of the inputbox

is
determined by the cell I select with my mouse?

Donald








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
return the row of any selected cell kim55 Excel Discussion (Misc queries) 3 November 15th 09 06:29 PM
Multiple cells or columns are selected instead of selected cell or Mikey Excel Discussion (Misc queries) 1 April 29th 09 09:48 PM
Returning a cell address in a msgbox, by selection via inputbox Ty FARAZ QURESHI Excel Discussion (Misc queries) 3 April 8th 09 12:57 PM
Return value(s) based on selected checkboxes Nikki Excel Worksheet Functions 5 May 7th 07 03:48 PM
InputBox to select cell locations Michael M Excel Worksheet Functions 5 February 21st 06 05:18 PM


All times are GMT +1. The time now is 02:56 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"