Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Hiding "modules"

Hi All

Yes I know you don't have modules any more...

For Each wbk in Application.Workbooks
For each sht in wbk.Sheets
Select Case sht.Name
Case "MySheet"
sht.Visible=False
End Select
Next
Next

....cycles through every sheet in every Workbook that is open, and
hides any that are called "MySheet". I want toi do the same with VB
Modules but can't seem to find the object - formerly known as a
"Module".

Help!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Hiding "modules"

On 31 Jan, 14:15, "Bob Phillips" wrote:
You can, but it is not a robust method as it *involves the use of SendKeys
which isn't too stable.

This is an example, but you may need to tune it

* * With Application
* * * * .SendKeys "%{F11}", True * *' VBE
* * * * .SendKeys "^r", True * * * *' Set focus to Explorer
* * * * .SendKeys "{TAB}", True * * ' Tab to locked project
* * * * .SendKeys "~", True * * * * ' Enter
* * * * .SendKeys "password"
* * * * .SendKeys "~", True * * * * ' Enter
* * End With

--
---
HTH


Fantastic. I haven't used SendKeys since Lotus 123 DOS where it was
extremely stable. In Windows it always seemed the keys arrived before
(or after) whatever menu was waiting for them. I'll write my will and
have a go at it after a couple of stiff brandies.

Thanks so much for your help.
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
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
VBE - Possible to have one of five modules in a VB project to be "default"? [email protected] Excel Discussion (Misc queries) 2 September 22nd 06 09:58 PM
How do display a "+" or "-" sign when hiding columns? DTI Tustin Setting up and Configuration of Excel 1 July 13th 06 01:21 PM
"Static" Methods in Class Modules Ripan[_3_] Excel Programming 2 January 12th 04 04:55 PM


All times are GMT +1. The time now is 02:57 PM.

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

About Us

"It's about Microsoft Excel"