LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default combining two short VBA scripts from two buttons

Hey Sloan, To answer question about Form Control verus Control ToolBox
Controls is. The Forms Controls a hold over from Excel 5 and Excel 95. which
gives you basic Controls. The Contol ToolBox Control are ActiveX controls.
The ActiveX controls have events and properties that set and use for more
flexible use of the required control. ie I reset the Caption property each
time I clicked on the CommandButton. The forms control does not have this
capability.
There serval good books on begining VBA for Excel. John Walkenbach has
severl books, I use," Excel 2000 Power Programing with VBA", I also use
John Green's , "Excel 2000 VBA Programmer's Reference".

HTH again, Rick

PS: Yes, the if/then is acting as on/off with the use of the Static
Boolean variable 'flag'. When the excel program initially starts the flag
variable is set to false. When the CommandButton is clicked the Caption of
of button changes, also the value of flag will change to true. Click the
Button again and the Caption changes back, the flag value is set back to
false. I should also note the selected columns hide and unhide, with each
toggle of the CommandButton. That in a nut shell is how the code works.



wrote in message
oups.com...
That's great!! I grabbed this code and switched over to the control
toolbox button. It's right-on, and I can (mostly) understand what's
going on. If/Then = on/off.

Bob, thanks for your idea, too. I couldn't get it to work, though. VBA
editor said there was a syntax error in the line:
.EntireColumn.Hidden = not .EntireColumn.Hidden =



A follow up question:
What's the difference between using the button from the
Tools--Customize--Commands:Forms area versus the button from the
Control Toolbox?

And can anyone reccommend a good starter text for basic VBA I'd use in
Excel?





 
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
delete scripts AND Excel Worksheet Functions 1 March 20th 09 01:16 PM
Forumlas or scripts? Gor_yee Excel Discussion (Misc queries) 0 October 16th 06 01:53 PM
SQL Scripts in Excel markus Excel Discussion (Misc queries) 1 October 13th 06 12:39 PM
SQL scripts and ODBC James McDowell[_2_] Excel Programming 0 January 13th 06 10:38 PM
Macintosh and VB Scripts ccoverne Excel Programming 2 November 29th 04 09:11 PM


All times are GMT +1. The time now is 04:31 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"