![]() |
How do I reduce the worksheet size ?
That works--thanks--but seems like excell would have that function built in
some where "Gord Dibben" wrote: Kevin You cannot do away with the unused cells. A worksheet has 256 columns and 65536 rows. You can hide the rows and columns you don't want to see as Jack suggests. Select them and FormatHide. Alternative.........You may want to try setting the Scroll Area. This setting will not remain after closing the file. Place a code line in the Workbook open event to set it each time when you open the workbook. Right-click on the Excel Logo left of your "File" on menu. Select "View Code" and paste the following in there. Save the workbook and close/re-open to see the scrollarea fixed to the range A1:H40 Private Sub Workbook_Open() Sheets("Sheet1").ScrollArea = "A1:H40" End Sub Adjust to your sheetname and range. Gord Dibben Excel MVP On Wed, 29 Sep 2004 07:31:09 -0700, "Kevin" wrote: I have a sheet that has buttons on for running macros. How do I just have the area of worksheet visable so people cannot scroll across or down. I don't wan't to freeze panes, I would like to do away with the unused cells altogether? |
Thanks Gord,
Am new to this forum but used your suggested code line and it works great for my purposes. I also have an "Intro" sheet that has numerous buttons on it and didn't want the op to be able to scroll the page. After setting up my buttons, using snap to align them....I increased cell 1A in both heigth and width such that it filled a little more than the screen. Then set a background color. Then got rid of the scroll bars in the OpenWorkbook module but the op could still scroll off the page with either the arrow keys or the mouse, but with your line of code, modified to fit my sheet: Sheets("INTRO").ScrollArea = "A1:A1" He/She's stuck in 1A.........:) Thanks for the direction here, Don |
Rueben
Thanks for the feedback. A built-in function for setting scroll area would be nice, but with the ability to do it through VBA, I see little incentive for the developers to make any alterations. Gord On Thu, 19 May 2005 18:10:01 -0700, Rueben wrote: That works--thanks--but seems like excell would have that function built in some where "Gord Dibben" wrote: Kevin You cannot do away with the unused cells. A worksheet has 256 columns and 65536 rows. You can hide the rows and columns you don't want to see as Jack suggests. Select them and FormatHide. Alternative.........You may want to try setting the Scroll Area. This setting will not remain after closing the file. Place a code line in the Workbook open event to set it each time when you open the workbook. Right-click on the Excel Logo left of your "File" on menu. Select "View Code" and paste the following in there. Save the workbook and close/re-open to see the scrollarea fixed to the range A1:H40 Private Sub Workbook_Open() Sheets("Sheet1").ScrollArea = "A1:H40" End Sub Adjust to your sheetname and range. Gord Dibben Excel MVP On Wed, 29 Sep 2004 07:31:09 -0700, "Kevin" wrote: I have a sheet that has buttons on for running macros. How do I just have the area of worksheet visable so people cannot scroll across or down. I don't wan't to freeze panes, I would like to do away with the unused cells altogether? |
|
All times are GMT +1. The time now is 11:33 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com