General Car Related Discussion. To discuss anything that is related to cars and automotive technology that doesnt naturally fit into another forum catagory.

Calling all VBA Genius's

Thread Tools
 
Search this Thread
 
Old Oct 6, 2009 | 11:31 AM
  #1  
It's Czech Mate's Avatar
It's Czech Mate
Thread Starter
............
 
Joined: Jun 2003
Posts: 12,970
Likes: 103
From: West Mids
Default Calling all VBA Genius's

I have an excel 2007 workbook containing a load of 'veryhidden' worksheets

I usually unhide with the following script but today its not happening!

Any ideas?

Sub UnhideAll()
Dim WS As Worksheet
For Each WS In Worksheets
WS.Visible = xlSheetVisible
Next
End Sub
Reply
Old Oct 6, 2009 | 12:14 PM
  #2  
danb21t's Avatar
danb21t
PassionFord Regular
 
Joined: Sep 2009
Posts: 421
Likes: 0
From: high wycombe
Default

have you recently migrated from 2003 to 2007?
Reply
Old Oct 6, 2009 | 12:17 PM
  #3  
It's Czech Mate's Avatar
It's Czech Mate
Thread Starter
............
 
Joined: Jun 2003
Posts: 12,970
Likes: 103
From: West Mids
Default

Originally Posted by danb21t
have you recently migrated from 2003 to 2007?

nope, used it for ages.
Reply
Old Oct 6, 2009 | 11:40 PM
  #4  
cjwood555's Avatar
cjwood555
Advanced PassionFord User
 
Joined: Feb 2005
Posts: 2,090
Likes: 0
From: Solihull
Default

Have you got more than one workbook open? could need modifying to:

For Each WS In ThisWorkbook.Worksheets or ActiveWorkbook.Worksheets

?
Reply
Old Oct 7, 2009 | 08:11 AM
  #5  
It's Czech Mate's Avatar
It's Czech Mate
Thread Starter
............
 
Joined: Jun 2003
Posts: 12,970
Likes: 103
From: West Mids
Default

Originally Posted by cjwood555
Have you got more than one workbook open? could need modifying to:

For Each WS In ThisWorkbook.Worksheets or ActiveWorkbook.Worksheets

?
Na, just this one. And I put the module in VBA Project for this particular workbook anyway.

Stumped to be honest as my VBA skills are limited!
Reply
Old Oct 7, 2009 | 06:57 PM
  #6  
cjwood555's Avatar
cjwood555
Advanced PassionFord User
 
Joined: Feb 2005
Posts: 2,090
Likes: 0
From: Solihull
Default

if you run it in step-through / debug mode and hover the pointer over 'WS' or 'Worksheets', does it show you the number of objects in the collection?

another thing worth checking might be that you haven't got events/updating disabled?
in the immediates windows (View, Immediates) type Application.EnableEvents=True and press enter. Same with Application.ScreenUpdating.

Send me a skeleton sheet if you like -

Last edited by cjwood555; Aug 1, 2012 at 11:54 PM.
Reply
Old Oct 7, 2009 | 07:49 PM
  #7  
Neil S's Avatar
Neil S
PassionFord Post Troll
20 Year Member
iTrader: (1)
 
Joined: May 2003
Posts: 2,815
Likes: 0
From: Cleveland
Default

Ditto, bung one through to me if you like, I'll have a look at it for you:


Last edited by Neil S; Oct 8, 2009 at 03:59 PM.
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
stevecfrst1
Cars for Sale
1
Sep 30, 2015 05:18 AM
rsguy
General Car Related Discussion.
44
Sep 29, 2015 03:29 PM
IainRS1700T
Cars for Sale
9
Sep 25, 2015 06:44 AM
oilman
Trader Parts for Sale.
0
Sep 23, 2015 11:21 AM




All times are GMT. The time now is 07:42 AM.