Further Show Hide Problem with VBA

  • Thread starter Thread starter DonH
  • Start date Start date
D

DonH

Hi again!

Bob kindly gave me a suggestion for using VBA to show /hide using a single
button. This worked fine until I decided I wanted to have another custom
area off to the side.

The problem being that when I try to return from this third view not all
rows columns are showing. I thought I might get round this by including an
unhide for all rows and columns to create a normal view to go from but then
the toggle views don't seem to do anything.

Any help greatly appreciated

DonH




Call Unl
Application.ScreenUpdating = False
Rows("25:75").EntireRow.Hidden = Not Rows("25:75").EntireRow.Hidden
Rows("98:148").EntireRow.Hidden = Not Rows("98:148").EntireRow.Hidden
Rows("244:294").EntireRow.Hidden = Not Rows("244:294").EntireRow.Hidden
Rows("317:367").EntireRow.Hidden = Not Rows("317:367").EntireRow.Hidden
Range("K4").Select
Calculate
Call Pro


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
Why does your unhide all not work?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
Sorry to be thick :-)

The new (third area) I created is

Columns("C:BH").EntireColumn.Hidden = False
Rows("4:367").EntireRow.Hidden = False
Columns("E:BA").EntireColumn.Hidden = True
Rows("4").EntireRow.Hidden = True
Rows("19:77").EntireRow.Hidden = True
Rows("91:150").EntireRow.Hidden = True
Rows("166:223").EntireRow.Hidden = True
Rows("238:296").EntireRow.Hidden = True
Rows("310:367").EntireRow.Hidden = True

When I go to

Rows("25:75").EntireRow.Hidden = Not Rows("25:75").EntireRow.Hidden
Rows("98:148").EntireRow.Hidden = Not Rows("98:148").EntireRow.Hidden
Rows("244:294").EntireRow.Hidden = Not Rows("244:294").EntireRow.Hidden
Rows("317:367").EntireRow.Hidden = Not Rows("317:367").EntireRow.Hidden

Cell info is missing so I tried to insert

Columns("C:BH").EntireColumn.Hidden = False
Rows("4:367").EntireRow.Hidden = False

to unhide the rows columns I need to see

Columns("C:BH").EntireColumn.Hidden = False
Rows("4:367").EntireRow.Hidden = False
Rows("25:75").EntireRow.Hidden = Not Rows("25:75").EntireRow.Hidden
Rows("98:148").EntireRow.Hidden = Not Rows("98:148").EntireRow.Hidden
Rows("244:294").EntireRow.Hidden = Not Rows("244:294").EntireRow.Hidden
Rows("317:367").EntireRow.Hidden = Not Rows("317:367").EntireRow.Hidden

When I rem out
Columns("C:BH").EntireColumn.Hidden = False
Rows("4:367").EntireRow.Hidden = False
the switching works fine until I go to the new view then when I go back
columns are missing and with the Rem removed the sitching gets stuck.

I'm getting very confused :-(

DonH
 
I'm getting very confused :-(


You and me both Don.

I am sorry, but I just don't get what the problem is that you are
experiencing.

You say cell info is missing, do you mean that it is hidden? When you hide
your rows, what is getting hidden that you don't want to be?
 

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

Back
Top