ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Inputbox default Question (https://www.excelbanter.com/excel-programming/395640-inputbox-default-question.html)

Les Stout[_2_]

Inputbox default Question
 
Hi all, when one makes a default for an input box e.g.
myInv = InputBox("PLease enter the number of the invoice to delete...",
"DELETE INVOICE", "024908")

When the dialog box opens the default "024908" is highlited and if the
user just types, it is deleted and written over, is there a way to
prevent this so that when they start typing it is after the 8 ??

Best regards,

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***

PCLIVE

Inputbox default Question
 
What purpose does the "024908" serve?
You could make the default number invisible to the user.

myInv = "024908" & InputBox("PLease enter the number of the invoice to
delete...","DELETE INVOICE)

HTH,
Paul

--

"Les Stout" wrote in message
...
Hi all, when one makes a default for an input box e.g.
myInv = InputBox("PLease enter the number of the invoice to delete...",
"DELETE INVOICE", "024908")

When the dialog box opens the default "024908" is highlited and if the
user just types, it is deleted and written over, is there a way to
prevent this so that when they start typing it is after the 8 ??

Best regards,

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***




Les Stout[_2_]

Inputbox default Question
 
Will probably take your advice and make it invisable thanks Paul...

Best regards,

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***

Pranav Vaidya

Inputbox default Question
 
I don't think there is a way in which you can set the cursor etc.
The best option according to me is to use a userform with a text box. The
user form will give you more flexibility as well.

--
Pranav Vaidya
VBA Developer
PN, MH-India
If you think my answer is useful, please rate this post as an ANSWER!!


"Les Stout" wrote:

Hi all, when one makes a default for an input box e.g.
myInv = InputBox("PLease enter the number of the invoice to delete...",
"DELETE INVOICE", "024908")

When the dialog box opens the default "024908" is highlited and if the
user just types, it is deleted and written over, is there a way to
prevent this so that when they start typing it is after the 8 ??

Best regards,

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***



All times are GMT +1. The time now is 05:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com