Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Directional buttons

I have a time sheet I want to put directional buttons on similar to a
calendar so you can move forward and backward to view different pay
periods.
Each pay period is 2 weeks long taking up 14 columns + 1 column for
NOTES + 1 column for a border, so every pay period is 16 columns wide.
Using the Macro Recorder in Excel 2007 it used this;
ActiveWindow.ScrollColumn = 21 or 37 or 53 etc. Could I count what
column the user is looking at and substitute the number after
ActiveWindow.ScrollColumn = with n+ or – 16 ?
Is this the best method for moving the focus for a user or can someone
suggest something better?
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Directional buttons

On Sep 7, 5:48*pm, GS wrote:
brought next idea :

I have a time sheet I want to put directional buttons on similar to a
calendar so you can move forward and backward to view different pay
periods.
Each pay period is 2 weeks long taking up 14 columns + 1 column for
NOTES + 1 column for a border, so every pay period is 16 columns wide.
Using the Macro Recorder in Excel 2007 it used this;
ActiveWindow.ScrollColumn = 21 or 37 or 53 etc. Could I count what
column the user is looking at and substitute the number after
ActiveWindow.ScrollColumn = with n+ or – 16 ?
Is this the best method for moving the focus for a user or can someone
suggest something better?


I can see where this isn't going to serve your purpose too well if
users use the tab key or arrow keys to navigate. Why can't they just
hold down the 'Alt' key while pressing PageUP (scroll left) or PageDn
(scroll right)?

--
Garry

Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


Different users have different size screens so using Alt PageUP might
work on some screens but not for others. Any thoughts on vb coding
which might work?
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default Directional buttons

Sub goright()
On Error Resume Next
ActiveCell.Offset(0, 16).Select
End Sub

Sub goleft()
On Error Resume Next
ActiveCell.Offset(0, -16).Select
End Sub


Gord Dibben Microsoft Excel MVP


On Thu, 8 Sep 2011 08:23:49 -0700 (PDT), wrote:

On Sep 7, 5:48*pm, GS wrote:
brought next idea :

I have a time sheet I want to put directional buttons on similar to a
calendar so you can move forward and backward to view different pay
periods.
Each pay period is 2 weeks long taking up 14 columns + 1 column for
NOTES + 1 column for a border, so every pay period is 16 columns wide.
Using the Macro Recorder in Excel 2007 it used this;
ActiveWindow.ScrollColumn = 21 or 37 or 53 etc. Could I count what
column the user is looking at and substitute the number after
ActiveWindow.ScrollColumn = with n+ or – 16 ?
Is this the best method for moving the focus for a user or can someone
suggest something better?


I can see where this isn't going to serve your purpose too well if
users use the tab key or arrow keys to navigate. Why can't they just
hold down the 'Alt' key while pressing PageUP (scroll left) or PageDn
(scroll right)?

--
Garry

Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


Different users have different size screens so using Alt PageUP might
work on some screens but not for others. Any thoughts on vb coding
which might work?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Directional buttons

used his keyboard to write :
On Sep 7, 5:48Â*pm, GS wrote:
brought next idea :

I have a time sheet I want to put directional buttons on similar to a
calendar so you can move forward and backward to view different pay
periods.
Each pay period is 2 weeks long taking up 14 columns + 1 column for
NOTES + 1 column for a border, so every pay period is 16 columns wide.
Using the Macro Recorder in Excel 2007 it used this;
ActiveWindow.ScrollColumn = 21 or 37 or 53 etc. Could I count what
column the user is looking at and substitute the number after
ActiveWindow.ScrollColumn = with n+ or €“ 16 ?
Is this the best method for moving the focus for a user or can someone
suggest something better?


I can see where this isn't going to serve your purpose too well if
users use the tab key or arrow keys to navigate. Why can't they just
hold down the 'Alt' key while pressing PageUP (scroll left) or PageDn
(scroll right)?

--
Garry

Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


Different users have different size screens so using Alt PageUP might
work on some screens but not for others. Any thoughts on vb coding
which might work?


Well, Alt+[PageUp/PageDn] WILL work on all screens but the scroll would
not necessarily be 16 columns at a time because it will be fixed to
however many columns fit the screen.

Gord offers a VBA solution and I won't give you such a simplistic way
to handle it. I have a project that scrolls 'modules' into view one
module at a time using a combobox. The modules may have any number of
columns each, not necessarily the same number in each. That said, the
code to manage this is fairly complex because it compensates for
wherever the user has navigated by any other means (tab, keyboard).
Each module is assigned a defined name when inserted in the wks, making
it much easier to manage/manipulate views as some modules can be
grouped for display while other modules are hidden (and vice versa).

--
Garry

Free usenet access at
http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


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
linking two cells that are bi-directional misscharliebrown Excel Discussion (Misc queries) 2 September 24th 08 09:47 PM
bi-directional dropdown boxes [email protected] Excel Programming 2 March 1st 07 03:17 PM
How do I set up a Speed and directional graph houndman Charts and Charting in Excel 0 July 2nd 06 03:11 PM
can you do a bi-directional link in excel Mahmoud Hamed Excel Discussion (Misc queries) 1 April 19th 05 10:47 PM
Bi-Directional Cell Linking Don Guillett[_4_] Excel Programming 0 October 1st 03 06:17 PM


All times are GMT +1. The time now is 06:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"