Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm using an input box to gather a condition for a macro. I found out
that I could click in a cell containing the needed data as well as typing in the input box. When I click on a cell the input box displays the cell reference rather than the cell content. Is there a way to have the input box display the content, for example 1/27/2011, rather than the reference =$E$238, for example? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Slim Slender presented the following explanation :
I'm using an input box to gather a condition for a macro. I found out that I could click in a cell containing the needed data as well as typing in the input box. When I click on a cell the input box displays the cell reference rather than the cell content. Is there a way to have the input box display the content, for example 1/27/2011, rather than the reference =$E$238, for example? This suggests you're using Excel's InputBox method rather than VBA's InputBox function. In this case, selecting cells is possible because the control is actually a refedit and so will return the selection address. That said, to get the cell contents you can use the address in the normal fashion: sMyVal = Application.InputBox... '//get cell reference sMyVal = Range(sMyVal).Value '//replace with contents HTH -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I should have said the var sMyVal should be declared as Variant type.
-- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Input cell should display a percentage of input value in the cell | Excel Discussion (Misc queries) | |||
Input and display help... | Excel Programming | |||
Cell display after input | Excel Discussion (Misc queries) | |||
How do I input 2525 to display 25.25 | Excel Discussion (Misc queries) | |||
How to display an input onto excel? | Excel Programming |