Minggu, 01 Januari 2012

[ExcelVBA] Excel driven countdown display VBA coding to restore toolbars

 

---------- Forwarded message ----------
From: Dr John C Bullas <john.bullas@gmail.com>
Date: Sat, 31 Dec 2011 20:07:12 +0000
Subject: Excel driven countdown display VBA coding to restore toolbars
To: ExcelVBA-owner@yahoogroups.com

Good Evening

The attached file(
countdown_display_v6_31-12-2011.xls<?ui=2&ik=1f01f936bb&view=att&th=13495b843c20e5f8&attid=0.2&disp=safe&realattid=f_gwv1w2h20&zw>)
is my
attempt at creating a countdown timer using excel and VBA .
I know you can probably do it in a better way but I like a
challenge

The sheet Sheet 2 holds the key variables

The code is composed of individual subroutines each of which
hide one element of the worksheet to deliver a frame with a display
in it, like Powerpoint

The counter is decrimented (counted down) using a dummy data
source ( dummy-data.txt
<?ui=2&ik=1f01f936bb&view=att&th=13495b90096c102b&attid=0.1&disp=safe&realattid=f_gwv1zorr1&zw>)which
is interrogated every minute to
force a refresh of now() quite sweet I thought

The problem I have is in restoring the toolbars as I can't work out the
opposite (reversal) of:

=========================
Sub RemoveAllToolbars()
Dim toolBar As CommandBar
Dim toolBarNum As Integer
Dim toolBarSheet As Worksheet
Set toolBarSheet = Sheets("Sheet1")
Application.ScreenUpdating = False

toolBarSheet.Cells.Clear

toolBarNum = 0
For Each toolBar In CommandBars
If toolBar.Type = msoBarTypeNormal Then
If toolBar.Visible Then
toolBarNum = toolBarNum + 1
toolBar.Visible = False
toolBarSheet.Cells(toolBarNum, 1) = toolBar.Name
End If
End If
Next toolBar
Application.ScreenUpdating = True
End Sub
========================

Which happily logs and removes all the toolbar icons!

Could someone help me out here? How do I get them back?? :)

Happy New Year, Merry Christmas etc!!!!

Dr B
Southampton UK
===========================
http://uk.linkedin.com/in/drjohnbullas

--
Sent from my mobile device

===========================
http://uk.linkedin.com/in/drjohnbullas

----------

DUMMY DATA

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity:
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

Tidak ada komentar:

Posting Komentar