Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel VBA - InputBox DEFAULT Value?

Can the DEFAULT parameter in an InputBox, reference a cell? I woul
like to use the value in another cell as the InputBox Default value.
Can this be done? If so, how; especially on another worksheet?
Thanks,
Bruc

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel VBA - InputBox DEFAULT Value?

res = InputBox( Prompt:="Enter something", Default:= _
Worksheets("Sheet3").Range("A9").Value)


or use Worksheets("Sheet3:").Range("A9").Text

if you want it to be entered as it is displayed by the cell.

--
Regards,
Tom Ogilvy


"BruceAtkinson " wrote in
message ...
Can the DEFAULT parameter in an InputBox, reference a cell? I would
like to use the value in another cell as the InputBox Default value.
Can this be done? If so, how; especially on another worksheet?
Thanks,
Bruce


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel VBA - InputBox DEFAULT Value?

Thanks Tom, I appreciate your help

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Excel VBA - InputBox DEFAULT Value?

Bruce,

Yep! Here's using a named cell, and using a cell reference...

''''''''''''''''
Dim mssg As String

mssg = InputBox("do your thing", "my thing",
Sheets("Sheet3").Range("Function"))
mssg = InputBox("do your thing", "my thing", Sheets("Sheet3").Range("B5"))
'''''''''''''''''''''
hth
--

steveB

(Remove 'NOSPAM' from email address if contacting me direct)


"BruceAtkinson " wrote in
message ...
Can the DEFAULT parameter in an InputBox, reference a cell? I would
like to use the value in another cell as the InputBox Default value.
Can this be done? If so, how; especially on another worksheet?
Thanks,
Bruce


---
Message posted from http://www.ExcelForum.com/



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
formating inputbox result in excel NoelH Excel Worksheet Functions 3 May 2nd 06 07:27 AM
Compile Error in Excel 2004 when Inputbox contains "VBCRLF" QTP Professional Excel Discussion (Misc queries) 1 November 18th 05 11:47 PM
Excel Inputbox Frank Excel Discussion (Misc queries) 1 May 19th 05 10:55 AM
Excel VBA Inputbox Properties? BruceAtkinson Excel Programming 2 May 25th 04 07:49 PM
Excel Macro Code invoking InputBox. Andrew Thorne Excel Programming 0 July 30th 03 10:23 PM


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