vba courses london - select case
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft VBA Training and help » vba courses london - Select case

vba courses london - Select case

resolvedResolved · Low Priority · Version Standard

replyReply Thu 8 Mar 2007, 09:40Delegate Nicola said...

Nicola has attended:
Excel VBA Intro Intermediate course

Select case

How do you do a case select routine

For upcoming training course dates see: Pricing & availability

replyReply Fri 9 Mar 2007, 16:09 Edited on Fri 9 Mar 2007, 16:21Trainer Carlos said...

RE: select case

Nicola

The Select Case routine is usually prefered to large nested If routines.

A simple Select Case routine is as follows:

Select Case Weather

Case "Rain"
Instruction = "Wear a Raincoat"

Case "Sunshine"
Instriction = "Use Suncream"

End Select

 

Vba tip:

Stop Display Alerts In Excel

When creating or deleting a Worksheet in Excel you don't want Excel to inform you "A file already exists....." Or "Do you want to save this file...".

To stop these alerts happening use the following line of code:

Application.DisplayAlerts = False

After the Create or Delete routine use:

Application.DisplayAlerts = True

View all VBA hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard