Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Syntax of hide/unhide personal.xls toggle


Help! In trying to come up with a macro to toggle the Personal.xl
workbook between hide & unhide, I can't seem to get the syntax correct
I have been working on the following but being so new, I am having
hard time referring to the workbook Personal.xls:

Private Sub HideUnHideWorksheet()
If Workbooks("Personal.xls").Sheet1.Visable = True Then
Workbooks("Personal.xls").Sheet1.Visable = False
Else
Workbooks("Personal.xls").Sheet1.Visable = True
End If
End Sub

Any ideas would be greatly appreciated. Please help keep it simple.
mikebur

--
mikebur
-----------------------------------------------------------------------
mikeburg's Profile: http://www.excelforum.com/member.php...fo&userid=2458
View this thread: http://www.excelforum.com/showthread.php?threadid=47035

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Syntax of hide/unhide personal.xls toggle

Hi Mike,

Try:

'==================
Sub Tester()
With Workbooks("Personal.xls").Sheets(1)
.Visible = Not (.Visible)
End With
End Sub

'<<==================


---
Regards,
Norman



"mikeburg" wrote in
message ...

Help! In trying to come up with a macro to toggle the Personal.xls
workbook between hide & unhide, I can't seem to get the syntax correct.
I have been working on the following but being so new, I am having a
hard time referring to the workbook Personal.xls:

Private Sub HideUnHideWorksheet()
If Workbooks("Personal.xls").Sheet1.Visable = True Then
Workbooks("Personal.xls").Sheet1.Visable = False
Else
Workbooks("Personal.xls").Sheet1.Visable = True
End If
End Sub

Any ideas would be greatly appreciated. Please help keep it simple.
mikeburg


--
mikeburg
------------------------------------------------------------------------
mikeburg's Profile:
http://www.excelforum.com/member.php...o&userid=24581
View this thread: http://www.excelforum.com/showthread...hreadid=470358



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Syntax of hide/unhide personal.xls toggle

Did you try recording a macro when you unhid personal.xls?

(It's the simplest I could do.)

mikeburg wrote:

Help! In trying to come up with a macro to toggle the Personal.xls
workbook between hide & unhide, I can't seem to get the syntax correct.
I have been working on the following but being so new, I am having a
hard time referring to the workbook Personal.xls:

Private Sub HideUnHideWorksheet()
If Workbooks("Personal.xls").Sheet1.Visable = True Then
Workbooks("Personal.xls").Sheet1.Visable = False
Else
Workbooks("Personal.xls").Sheet1.Visable = True
End If
End Sub

Any ideas would be greatly appreciated. Please help keep it simple.
mikeburg

--
mikeburg
------------------------------------------------------------------------
mikeburg's Profile: http://www.excelforum.com/member.php...o&userid=24581
View this thread: http://www.excelforum.com/showthread...hreadid=470358


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I unhide the PERSONAL.XLS worksheet? SteveyP66 Excel Worksheet Functions 1 August 9th 06 12:55 PM
unhide personal.xls? excelchallenged Excel Discussion (Misc queries) 6 June 15th 05 11:19 PM
unhide personal.xls ..... continued excelchallenged Excel Discussion (Misc queries) 0 June 15th 05 07:17 PM


All times are GMT +1. The time now is 08:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"