ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Input box (https://www.excelbanter.com/excel-programming/416896-input-box.html)

Oldjay

Input box
 
Screwed up my first question. Here is the correct question

I have the following code

quotenumber = InputBox("Please enter QUOTE number to recall , "The Auld
Company", "C:\Quick Quotes3\")
QUOTE = quotenumber & ".XLS"

As shown it highlights " C:\Quick Quotes3\" in the input box. I want it to
place the cursor at the end of C:\Quick Quotes3\

oldjay

JLGWhiz

Input box
 
In my system, it does put the cursor (insertion point) at the end ot the
default value. If you press the right arrow on the arrow keys, then the
highlight should go away and you will see the blinking insertion marker, or
cursor.

"Oldjay" wrote:

Screwed up my first question. Here is the correct question

I have the following code

quotenumber = InputBox("Please enter QUOTE number to recall , "The Auld
Company", "C:\Quick Quotes3\")
QUOTE = quotenumber & ".XLS"

As shown it highlights " C:\Quick Quotes3\" in the input box. I want it to
place the cursor at the end of C:\Quick Quotes3\

oldjay


Oldjay

Input box
 
Is there any code that will move the cursor to the end?

"JLGWhiz" wrote:

In my system, it does put the cursor (insertion point) at the end ot the
default value. If you press the right arrow on the arrow keys, then the
highlight should go away and you will see the blinking insertion marker, or
cursor.

"Oldjay" wrote:

Screwed up my first question. Here is the correct question

I have the following code

quotenumber = InputBox("Please enter QUOTE number to recall , "The Auld
Company", "C:\Quick Quotes3\")
QUOTE = quotenumber & ".XLS"

As shown it highlights " C:\Quick Quotes3\" in the input box. I want it to
place the cursor at the end of C:\Quick Quotes3\

oldjay


JLGWhiz

Input box
 
The InputBox is a pre-defined function or procedure of Microsoft. I don't
know of a way to manage the cursor without having their source code, and that
is not likely to happen. Like I said, it should already be where you want
it. The text that is in there by default is highlighted so that if you want
to change from the default, all you have to do is start typing and it
automatically deletes the default text.

If you only want to extend the default by adding data to it, maybe you
should think about doing it a different way. For example:

quotenumber = InputBox("Please enter QUOTE number to recall , "The Auld
Company")
QUOTE = "C:\Quick Quotes3\" & quotenumber & ".XLS"

This adds the quote number by concatenating the text you had used as default
to the user input. Would that meet your needs?





"Oldjay" wrote:

Is there any code that will move the cursor to the end?

"JLGWhiz" wrote:

In my system, it does put the cursor (insertion point) at the end ot the
default value. If you press the right arrow on the arrow keys, then the
highlight should go away and you will see the blinking insertion marker, or
cursor.

"Oldjay" wrote:

Screwed up my first question. Here is the correct question

I have the following code

quotenumber = InputBox("Please enter QUOTE number to recall , "The Auld
Company", "C:\Quick Quotes3\")
QUOTE = quotenumber & ".XLS"

As shown it highlights " C:\Quick Quotes3\" in the input box. I want it to
place the cursor at the end of C:\Quick Quotes3\

oldjay


Rick Rothstein

Input box
 
I don't believe so. The idea of the default value is it is a suggested
answer allowing the user to either hit Enter to accept it or begin typing a
new value instead. Personally, I think you are using trying to use the
InputBox incorrectly. Just ask for the Quote number itself (what you want
the user to type in anyway) and concatenate it onto the path yourself.
Something like this maybe...

Path = "C:\Quick Quotes3\"
QuoteNumber = InputBox("Please enter QUOTE number to recall for..." & _
vbLf & vbLf & "The Auld Company (" & Path & ")", _
"The Auld Company")
QUOTE = "C:\Quick Quotes3\" & QuoteNumber & ".XLS"

--
Rick (MVP - Excel)


"Oldjay" wrote in message
...
Is there any code that will move the cursor to the end?

"JLGWhiz" wrote:

In my system, it does put the cursor (insertion point) at the end ot the
default value. If you press the right arrow on the arrow keys, then the
highlight should go away and you will see the blinking insertion marker,
or
cursor.

"Oldjay" wrote:

Screwed up my first question. Here is the correct question

I have the following code

quotenumber = InputBox("Please enter QUOTE number to recall , "The Auld
Company", "C:\Quick Quotes3\")
QUOTE = quotenumber & ".XLS"

As shown it highlights " C:\Quick Quotes3\" in the input box. I want it
to
place the cursor at the end of C:\Quick Quotes3\

oldjay



Oldjay

Input box
 
Thanks

"Rick Rothstein" wrote:

I don't believe so. The idea of the default value is it is a suggested
answer allowing the user to either hit Enter to accept it or begin typing a
new value instead. Personally, I think you are using trying to use the
InputBox incorrectly. Just ask for the Quote number itself (what you want
the user to type in anyway) and concatenate it onto the path yourself.
Something like this maybe...

Path = "C:\Quick Quotes3\"
QuoteNumber = InputBox("Please enter QUOTE number to recall for..." & _
vbLf & vbLf & "The Auld Company (" & Path & ")", _
"The Auld Company")
QUOTE = "C:\Quick Quotes3\" & QuoteNumber & ".XLS"

--
Rick (MVP - Excel)


"Oldjay" wrote in message
...
Is there any code that will move the cursor to the end?

"JLGWhiz" wrote:

In my system, it does put the cursor (insertion point) at the end ot the
default value. If you press the right arrow on the arrow keys, then the
highlight should go away and you will see the blinking insertion marker,
or
cursor.

"Oldjay" wrote:

Screwed up my first question. Here is the correct question

I have the following code

quotenumber = InputBox("Please enter QUOTE number to recall , "The Auld
Company", "C:\Quick Quotes3\")
QUOTE = quotenumber & ".XLS"

As shown it highlights " C:\Quick Quotes3\" in the input box. I want it
to
place the cursor at the end of C:\Quick Quotes3\

oldjay




Oldjay

Input box
 
Thanks

"JLGWhiz" wrote:

The InputBox is a pre-defined function or procedure of Microsoft. I don't
know of a way to manage the cursor without having their source code, and that
is not likely to happen. Like I said, it should already be where you want
it. The text that is in there by default is highlighted so that if you want
to change from the default, all you have to do is start typing and it
automatically deletes the default text.

If you only want to extend the default by adding data to it, maybe you
should think about doing it a different way. For example:

quotenumber = InputBox("Please enter QUOTE number to recall , "The Auld
Company")
QUOTE = "C:\Quick Quotes3\" & quotenumber & ".XLS"

This adds the quote number by concatenating the text you had used as default
to the user input. Would that meet your needs?





"Oldjay" wrote:

Is there any code that will move the cursor to the end?

"JLGWhiz" wrote:

In my system, it does put the cursor (insertion point) at the end ot the
default value. If you press the right arrow on the arrow keys, then the
highlight should go away and you will see the blinking insertion marker, or
cursor.

"Oldjay" wrote:

Screwed up my first question. Here is the correct question

I have the following code

quotenumber = InputBox("Please enter QUOTE number to recall , "The Auld
Company", "C:\Quick Quotes3\")
QUOTE = quotenumber & ".XLS"

As shown it highlights " C:\Quick Quotes3\" in the input box. I want it to
place the cursor at the end of C:\Quick Quotes3\

oldjay



All times are GMT +1. The time now is 12:43 PM.

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