Hiding rows when opening workbook

M

mardo

Hi,

I'm trying to hide two sets of rows from one worksheet when the
workbook opens, but I just can't make the macro work. I know the macro
is simple, but there is something what I don't understand

I need to hide rows 41:47 and 50:54 from sheet3.

Can you guys help me out please?

Regards, Mardo
 
J

JE McGimpsey

Hi,

I'm trying to hide two sets of rows from one worksheet when the
workbook opens, but I just can't make the macro work. I know the macro
is simple, but there is something what I don't understand

I need to hide rows 41:47 and 50:54 from sheet3.

Can you guys help me out please?

One way:

put this in the ThisWorkbook code module (CTRL-click the window's top
bar and choose View Code):

Private Sub Workbook_Open()
Sheets("Sheet3").Range("41:47,50:54").EntireRow.Hidden = True
End Sub
 

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