training access vba london - word vba
Microsoft Office TrainingThe UK's Number 1 for Microsoft Office Training Sitemap add this page to your favourites/bookmarksBookmark page
 
view a printable version of this 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 » training access vba london - Word vba

training access vba london - Word vba

resolvedResolved · Low Priority · Version Standard

replyReplyThu 15 Nov 2007, 13:38Delegate Jane said...

Word vba

am preparing a template and am asking a question which i need a message box to appear. i have inserted the following code

Private Sub EUVAT_Click()
If BillAmounts.EUVAT = Yes Then
Sub NewMessage()
MsgBox("Is the Client VAT number shown above correctly?", vbYesNo) = vbYes
End If
End Sub

when i click yes in the template BillAmounts gets highlighted and error Expected End Sub.

I would be grateful for some help, I havent done any vba since training in June !


For upcoming training course dates see: Pricing & availability

replyReplyWed 21 Nov 2007, 10:29Trainer Carlos said...

RE: word vba

Hi Jane

The error message is due to the fact you did a Sub Newmessage in the middle of the if statement. Try the following code istead:

Private Sub EUVAT_Click()

Dim Reply As Byte

If BillAmounts.EUVAT = Yes Then

Reply = MsgBox("Is the Client VAT number shown above correctly?", vbYesNo)

If Reply = vbYes Then

'Code for Yes reply

Else

'Code for No reply

End If

End If

End Sub


Hope this helps

Carlos

 

 

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

forum postHow do you group individual dates into months and years?

» Forum post: Pivot tables


Rate this page:
2.2/5 (213 votes cast)
Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses
Microsoft Certified Partner
Security Seal verified by visa, mastercard securecard

Mini sitemap. These are the main areas of our web site. Full sitemap.

Management training

Professional Skills courses
Project Management Course London
Project Management Courses London
Project Management Training London
Project Management Training
Project Seminar
Project Seminars
Time Management Course London
Time Management London
Time Management Courses London
Time Management Training London
Introduction to Finance course
Assertiveness Skills course
Effective Communications Skills training
Presentation Skills London

Training Formats

Public scheduled courses
On-site training
Closed company courses

Consultancy
Application Development

Blogs

Excel Training
MS Project Training
Microsoft Training Blog

Version differences

Office 2010 vs 2007
MS Project version differences

Training Information

London Computer Training
Computer Training London
Docklands Training Courses
Docklands Training London

Training venues London
Client list
FAQ
Pricing and availability
Course details / Syllabus

Training Articles
Training Information

Microsoft training

Microsoft Office training
& IT Applications

Microsoft Project training
Microsoft Outlook training
Microsoft Powerpoint training
Microsoft Word training
MS Project courses
MS Project training
Outlook courses
PowerPoint courses
PowerPoint training
VBA courses
Word courses
Microsoft.training
(more...)

Excel Training

Excel courses
Excel Training Courses Medway
Autonumber in Excel
Microsoft Excel training
Basic Excel Courses
Basic Excel Course
Basic Excel Training

Interested in MS Access training?

Access courses
Microsoft Access training
Microsoft access courses
Microsoft training access course
Microsoft+access+training
Access courses in london

Training provider

Training providers
IT training companies
IT training providers
Management Training providers
Management Training provider

Event history, feedback results
Events in 2012 · 2011 · 2010 · More

See also

Crystal Reports training