A
Art
I created a macro in Excel 2007 so users can hide the top two rows of a
spreadsheet to make more real estate to work with the remaining rows.
However, I have an image (our school's logo) in the first row which remains
visible when the two rows are hidden.
I found something online about being able to turn the visibility of an image
off/on, but I do not know how to identify the name of the image. Here's what
I found:
Me.Shapes("picture 2").Visible = True
What is the ME part? Is it the name of the sheet? or the workbook? How do I
find the name of the image?
The same image is used on every sheet and its always the top two rows on any
sheet I want to be able to hide/unhide. So, I want the macro to work for any
sheet in the spreadsheet.
Here's the macro to hide the two rows. I want to include the hide image line
in here as well. (I assume I would just use False to unhide the rows and True
for the visibility of the image as the alternative macro.)
-----------------------------
Sub hidetworows()
'
' hidetworows Macro
' This macro will hide the top two rows in the spreadsheet, including the
kendall logo and directions.
'
' Keyboard Shortcut: Ctrl+h
'
Rows("1:2").Select
Selection.EntireRow.Hidden = True
End Sub
spreadsheet to make more real estate to work with the remaining rows.
However, I have an image (our school's logo) in the first row which remains
visible when the two rows are hidden.
I found something online about being able to turn the visibility of an image
off/on, but I do not know how to identify the name of the image. Here's what
I found:
Me.Shapes("picture 2").Visible = True
What is the ME part? Is it the name of the sheet? or the workbook? How do I
find the name of the image?
The same image is used on every sheet and its always the top two rows on any
sheet I want to be able to hide/unhide. So, I want the macro to work for any
sheet in the spreadsheet.
Here's the macro to hide the two rows. I want to include the hide image line
in here as well. (I assume I would just use False to unhide the rows and True
for the visibility of the image as the alternative macro.)
-----------------------------
Sub hidetworows()
'
' hidetworows Macro
' This macro will hide the top two rows in the spreadsheet, including the
kendall logo and directions.
'
' Keyboard Shortcut: Ctrl+h
'
Rows("1:2").Select
Selection.EntireRow.Hidden = True
End Sub