ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Navigate a worksheet when under control of a macro.... (https://www.excelbanter.com/excel-programming/340966-navigate-worksheet-when-under-control-macro.html)

Neal Zimm

Navigate a worksheet when under control of a macro....
 
i guess i'm an advanced novice when it comes to VB.
I've coded a number of input boxes where various selections are made,
and actions taken based on the input.

I have a need for a user to get to different places in a worksheet when
"under the control" of an input box, before the "real data" is input. (no
need for scrolling left or right)

having them enter p1 to go towards the top 1 page, or p-1 for the opposite
seems a little excessive. same for entering a row number, soooooo

Is there a way to bring the "page up" and "page down" keys, and the up and
down
arrows as input, when an input box is awaiting an answer?
I've seen nothing in Excel help, and the answer seems 'no' from what I've
read on this board.

Thanks.

--
Neal Z

Dave Peterson

Navigate a worksheet when under control of a macro....
 
I don't think you can do much if you're really using an inputbox.

If you know where the user is supposed to be before you show the inputbox, you
could could do something first.

application.goto activesheet.range("a1"),scroll:=true
sometextvariable = inputbox(....)

If you're actually using a userform and you're using xl2k or higher), you could
show the userform like:

UserForm1.Show False
(modeless)

Which means that the user can click on the worksheet and change/scroll while the
userform is showing.

(It would seem like giant overkill to add scroll options to a userform, but I
bet you could do it!)

You could put a bunch of buttons (or even scrollbars) on a userform and assign
code like:

Private Sub CommandButton1_Click()
ActiveWindow.ScrollRow = ActiveWindow.ScrollRow + 1
End Sub




Neal Zimm wrote:

i guess i'm an advanced novice when it comes to VB.
I've coded a number of input boxes where various selections are made,
and actions taken based on the input.

I have a need for a user to get to different places in a worksheet when
"under the control" of an input box, before the "real data" is input. (no
need for scrolling left or right)

having them enter p1 to go towards the top 1 page, or p-1 for the opposite
seems a little excessive. same for entering a row number, soooooo

Is there a way to bring the "page up" and "page down" keys, and the up and
down
arrows as input, when an input box is awaiting an answer?
I've seen nothing in Excel help, and the answer seems 'no' from what I've
read on this board.

Thanks.

--
Neal Z


--

Dave Peterson

Neal Zimm

Navigate a worksheet when under control of a macro....
 
Dear Dave,
thanks for the answer. I've a fair amount of programming experience but am
totally self taught in VB. I use input boxes, becasue that's the only input
method
I've learned so far. Am reviewing books to buy, since next on the hit parade
is user forms. Thanks again.

--
Neal Z


"Dave Peterson" wrote:

I don't think you can do much if you're really using an inputbox.

If you know where the user is supposed to be before you show the inputbox, you
could could do something first.

application.goto activesheet.range("a1"),scroll:=true
sometextvariable = inputbox(....)

If you're actually using a userform and you're using xl2k or higher), you could
show the userform like:

UserForm1.Show False
(modeless)

Which means that the user can click on the worksheet and change/scroll while the
userform is showing.

(It would seem like giant overkill to add scroll options to a userform, but I
bet you could do it!)

You could put a bunch of buttons (or even scrollbars) on a userform and assign
code like:

Private Sub CommandButton1_Click()
ActiveWindow.ScrollRow = ActiveWindow.ScrollRow + 1
End Sub




Neal Zimm wrote:

i guess i'm an advanced novice when it comes to VB.
I've coded a number of input boxes where various selections are made,
and actions taken based on the input.

I have a need for a user to get to different places in a worksheet when
"under the control" of an input box, before the "real data" is input. (no
need for scrolling left or right)

having them enter p1 to go towards the top 1 page, or p-1 for the opposite
seems a little excessive. same for entering a row number, soooooo

Is there a way to bring the "page up" and "page down" keys, and the up and
down
arrows as input, when an input box is awaiting an answer?
I've seen nothing in Excel help, and the answer seems 'no' from what I've
read on this board.

Thanks.

--
Neal Z


--

Dave Peterson


Dave Peterson

Navigate a worksheet when under control of a macro....
 
Debra Dalgleish has a list at her site:
http://www.contextures.com/xlbooks.html

John Walkenbach's is a nice one to start with. See if you can find them in your
local bookstore and you can choose what one you like best.

Neal Zimm wrote:

Dear Dave,
thanks for the answer. I've a fair amount of programming experience but am
totally self taught in VB. I use input boxes, becasue that's the only input
method
I've learned so far. Am reviewing books to buy, since next on the hit parade
is user forms. Thanks again.

--
Neal Z

"Dave Peterson" wrote:

I don't think you can do much if you're really using an inputbox.

If you know where the user is supposed to be before you show the inputbox, you
could could do something first.

application.goto activesheet.range("a1"),scroll:=true
sometextvariable = inputbox(....)

If you're actually using a userform and you're using xl2k or higher), you could
show the userform like:

UserForm1.Show False
(modeless)

Which means that the user can click on the worksheet and change/scroll while the
userform is showing.

(It would seem like giant overkill to add scroll options to a userform, but I
bet you could do it!)

You could put a bunch of buttons (or even scrollbars) on a userform and assign
code like:

Private Sub CommandButton1_Click()
ActiveWindow.ScrollRow = ActiveWindow.ScrollRow + 1
End Sub




Neal Zimm wrote:

i guess i'm an advanced novice when it comes to VB.
I've coded a number of input boxes where various selections are made,
and actions taken based on the input.

I have a need for a user to get to different places in a worksheet when
"under the control" of an input box, before the "real data" is input. (no
need for scrolling left or right)

having them enter p1 to go towards the top 1 page, or p-1 for the opposite
seems a little excessive. same for entering a row number, soooooo

Is there a way to bring the "page up" and "page down" keys, and the up and
down
arrows as input, when an input box is awaiting an answer?
I've seen nothing in Excel help, and the answer seems 'no' from what I've
read on this board.

Thanks.

--
Neal Z


--

Dave Peterson


--

Dave Peterson


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

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