vba courses london - if case loop
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 loop

vba courses london - Select case loop

resolvedResolved · Low Priority · Version Standard

replyReply Thu 1 Feb 2007, 10:07 Edited on Thu 1 Feb 2007, 16:06Delegate Jennifer said...

Select case loop

How do I create an Select case loop?

For upcoming training course dates see: Pricing & availability

replyReply Thu 1 Feb 2007, 16:12Trainer Carlos said...

RE: Select case loop

A Select Case loop is a better way of running multiple IF statements. The syntax is

Select Case <Variable>

<Run Code>

End Select

eg.

Select Case City

Case "London"
Delivery = 50

Case "Glasgow"
Delivery = 75

End Select

 

Vba tip:

Count the Rows and Columns in a Selection

If you need to count the number of rows or columns in a worksheet use the following code:

Selection.Rows.Count - Returns the number of rows in the selection

Selection.Columns.Count - Returns the number of columns in the selection

Selection.CurrentRegion.Rows.Count - Returns the number of rows in the current region of the selection

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