Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default Excel 2007 SP1 - How to correct scrollbar extent?

This code gives the correct number of Rows and Columns being used in my
worksheet:-

Dim x As Worksheet
Set x = Worksheets("Store")
Debug.Print x.Cells.Rows.End(xlDown).Row
Debug.Print x.Cells.Columns.End(xlToRight).Column

However, due to accidental over-scrolling, the displayed Excel scrollbars
represent a range of about 40 columns (instead of my sheet's correct number
of 27) and 65535 rows (instead of my sheet's correct number of 1253).

This is a major problem with Office 2007 (I don't remember it happening with
earlier versions) because when you try to import the worksheet into an Access
2007 table, you get 65535 (mostly blank) rows imported instead of 1253 and
you have to mess around identifying the blank rows and deleting them.

You also get error messages that Field28 doesn't exist, etc, if you try to
import to an existing table instead of a new one.

How do you correct Excel's internal scroll range (and/or the Access 2007
import wizard) to match "Cells.Rows.End(xlDown).Row" and
"Cells.Columns.End(xlToRight).Column"?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Excel 2007 SP1 - How to correct scrollbar extent?

You can reset the last used cell on the worksheet. This last used cell is where
you go when you hit ctrl-end.

You can find some techniques at Debra Dalgleish's site for resetting the last
used cell:
http://www.contextures.com/xlfaqApp.html#Unused



Ron West wrote:

This code gives the correct number of Rows and Columns being used in my
worksheet:-

Dim x As Worksheet
Set x = Worksheets("Store")
Debug.Print x.Cells.Rows.End(xlDown).Row
Debug.Print x.Cells.Columns.End(xlToRight).Column

However, due to accidental over-scrolling, the displayed Excel scrollbars
represent a range of about 40 columns (instead of my sheet's correct number
of 27) and 65535 rows (instead of my sheet's correct number of 1253).

This is a major problem with Office 2007 (I don't remember it happening with
earlier versions) because when you try to import the worksheet into an Access
2007 table, you get 65535 (mostly blank) rows imported instead of 1253 and
you have to mess around identifying the blank rows and deleting them.

You also get error messages that Field28 doesn't exist, etc, if you try to
import to an existing table instead of a new one.

How do you correct Excel's internal scroll range (and/or the Access 2007
import wizard) to match "Cells.Rows.End(xlDown).Row" and
"Cells.Columns.End(xlToRight).Column"?


--

Dave Peterson
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
vertical scrollbar in Excel a0xbjzz Excel Discussion (Misc queries) 1 July 16th 08 08:29 PM
Charts made in excel 2003 won't print to the correct size in 2007? Deb[_2_] Charts and Charting in Excel 1 September 16th 07 05:10 PM
Excel scrollbar dougofbh Excel Discussion (Misc queries) 1 November 13th 06 06:02 PM
insert scrollbar into a cell in Excel Nick Excel Worksheet Functions 0 October 19th 05 05:56 PM
scrollbar reslut makes another scrollbar to show Patrik Excel Discussion (Misc queries) 0 April 18th 05 03:11 PM


All times are GMT +1. The time now is 06:47 AM.

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

About Us

"It's about Microsoft Excel"