Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Hidden Columns - Scrollbar Issue

Status
Not open for further replies.

PaultheS

Programmer
May 12, 2005
92
CA
Right now I'm working on a program for an Access database that creates a spreadsheet for a user to fill in and then imports the data back into Access.

The first two columns of the spreadsheet contain data only useful to the program that would mean nothing to the user. So, I've had those two columns automatically hidden. The problem is, Excel still seems to detect those two columns on its scrollbar, so when scrolling left it always looks like you're not at the end of the spreadsheet. Clearly this could be confusing, and I'd rather have the scrollbar just behave as if column C is the furthest left cell.

Any way to do this or something similar, or am I just stuck?
 
nope - unfortunately not. Only thing you can do is remove the scrollbar altogether

ActiveWindow.DisplayHorizontalScrollBar = False

Rgds, Geoff

Don't let DPlank beam me up again Ascotta - I want my clothes to be kept on this time

Please read FAQ222-2244 before you ask a question
 
As a workaround, try setting the column widths to a very small value. This seems to allow the scrollbar to behave "normally". I used a width of 0.05; too small a value produces the same undesired scrollbar behavior.


Regards,
Mike
 
Interesting Mike, but I can't seem to get it to work properly...

On your sheet, how does the scrollbar behave if you click on a cell and then use the arrow keys to move all the way left? How about if you click on the area on the scrollbar between the bar and the arrow (the one that makes the bar jump) when you aren't all the way left already? Does the scrollbar go all the way left, or does it leave that annoying gap still?
 
Just a though: Have you tried to freeze the panes ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
PaultheS,

You are correct. My workaround doesn't really work very well, especially with the arrow keys. PHV's solution seems to work, however. Place the cell pointer in cell C1 and select Freeze Panes from the menu. Then Hide columns A & B.


Mike
 
Yep, good call PHV. Works like a charm.

Thanks for your help guys.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top