Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Retaining the default in an input box - again

I have as suggested by Tom Ogilvy, looked at Input box help again but
failed to find how to retain as default THE STRING LAST ENTERED BY THE
USER (as doable in old steam Excel).

Any further suggestions - or has the facility fallen by the wayside?



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 90
Default Retaining the default in an input box - again

Don't know but a very simple solution is
Dim foo
Sub Macro1()
foo = InputBox("Fill me", , foo)
End Sub
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Retaining the default in an input box - again

INPUT(message_text, type_num, title_text, default, x_pos, y_pos, help_ref)

=INPUT("Use this again or overwrite",3, "Enter accountingdate", Z99)

message_text = "Use this again or overwrite"
type_num = 3
title_text = "Enter accountingdate"
default = Z99


The equivalent in VBA:

expression.InputBox(Prompt, Title, Default, Left, Top, HelpFile,
HelpContextId, Type)


res = Application.InputBox(Prompt:="Use this again or overwrite", _
Title:="Enter accountingdate", _
Default:=worksheets("Sheet1").Range("Z99"), _
Type:=3)
worksheets("Sheet1").Range("Z99").Value = res

--
Regards,
Tom Ogilvy




"Gordon Humphreys" wrote in message
...
I have as suggested by Tom Ogilvy, looked at Input box help again but
failed to find how to retain as default THE STRING LAST ENTERED BY THE
USER (as doable in old steam Excel).

Any further suggestions - or has the facility fallen by the wayside?



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



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
Inserting and retaining an input variable ARGT Excel Discussion (Misc queries) 4 June 26th 08 11:42 PM
Turning off the default date input Hanne Excel Discussion (Misc queries) 2 April 30th 08 05:16 PM
default name and value in input cell [email protected] Excel Worksheet Functions 4 November 13th 06 04:42 PM
How to copy a row with transposing to a column retaining links to input cells? Dmitry Excel Worksheet Functions 2 July 19th 06 10:09 AM
Retaining a default in an input box Gordon Humphreys[_2_] Excel Programming 1 August 15th 03 02:48 PM


All times are GMT +1. The time now is 07:50 AM.

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"