Formatting an excel worksheet to create a form

R

Robert SD

Hello,
How do I remove unwanted rows and columns from a worksheet? I'm trying to
create a form and I only want columns A through F and rows 1 through 44 to
show.
 
G

Gord Dibben

You cannot remove excess rows and columns.

You can hide them from view.

You could also set the scrollarea limited to A1:F44 through VBA.


Gord Dibben MS Excel MVP

On Fri, 20 Mar 2009 11:11:01 -0700, Robert SD <Robert
 
O

Otto Moehrbach

Hide the unwanted rows and columns. Select row 45. Then do Shift-End-Down
arrow. This selects all the rows from 45 down. Click on Format - Rows -
Hide.
Do the same thing with the columns but use Shift - End - Right arrow. HTH
Otto
 
R

Robert SD

Thanks Gord. How do I do that?

Gord Dibben said:
You cannot remove excess rows and columns.

You can hide them from view.

You could also set the scrollarea limited to A1:F44 through VBA.


Gord Dibben MS Excel MVP

On Fri, 20 Mar 2009 11:11:01 -0700, Robert SD <Robert
 
G

Gord Dibben

Set the scrollarea to a range using VBA.

Since the scrollarea method does not stick between sessions you will have to
reset it each time you open the workbook.

You may wish to place the code into a WorkBook_Open Sub in ThisWorkbook
module and specify which worksheet if only one sheet required.

Adjust the sheetname and range to suit.

Private Sub WorkBook_Open()
Sheets("YourSheet").ScrollArea = "A1:F44"
End Sub

Or also in the Thisworkbook module to limit scrollarea on all sheets.

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
With ActiveSheet
.ScrollArea = "A1:F44"
End With
End Sub


Gord
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top