access vba course - vba message box
Microsoft Office Training verified by visa - mastercard securecode about microsoft training company london ukadd this page to your favourites/bookmarksAdd to favourites
view a printable version of this pagePrintable version
email this page to somebodyEmail this page
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft VBA Training and help » access vba course - Vba Message Box

access vba course - Vba Message Box

The UK's most regular instructor-led training courses.
Training information: access vba course · Excel london

resolvedResolved · Low Priority · Version Standard

Vba Message Box

Dimitrios has attended:
Excel Advanced course
Excel VBA course

by - delegate Dimitrios [4 posts] (2007 Jul 9 Mon, 11:38) replyReply

Hello,

I would like to create a message box where it will say: "Copy yesterday's data?". If the user replies yes, then i want it to execute the macro that i have created in VBA (named Main) eitherwise do nothing. So far, my macro lloks like this:

Sub Main()

Application.ScreenUpdating = False
Prices
Weights
Values
Exit Sub

Dim reply As Integer

reply = MsgBox("Copy Yesterday's Data?", vbYesNo)
If reply = vbYes Then

Else
Resume
End If



I am not sure what to add after the THEN in order to make it run the MAIN sub. any help will be greatly appreciated.

RE: Vba Message Box

by - trainer Carlos gold contributer[360 posts] (2007 Jul 11 Wed, 15:43) replyReply

Dimitrios

After the THEN you enter the following line:

Call Main

This runs the Main macro.

Regards

Carlos


Related articles

· What Is Microsoft Excel VBA and How Can It Help You Work Smarter?
· Company Roles in Visual Basic Training

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

Institute of IT Training - Accredited Training Provider Institute of IT Training - Accredited Training Provider Prodigy Platinum Learning Partner Microsoft Office Specialist Authorised Testing Centre

Microsoft Registered Partner
microsoft office
ms office project server

Association of Computer Trainers Valid HTML 4.01 Transitional
Valid CSS Markup

secure online payments - visa - mastercard

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

Training by application Main information pages See also

Access courses
DreamWeaver courses
Excel courses
MS Project courses
Outlook courses
PowerPoint courses
VBA courses
Word courses
(more...)

Public scheduled courses
On-site training
Closed company courses

Microsoft Office training
Pricing and availability
Training schedule
Training venues

Access training
Dreamweaver training
Excel training
MS Project training
PowerPoint training

London Computer Training
Computer Training London

Microsoft Access training
Microsoft Excel training
Microsoft Project training
Microsoft Outlook training
Microsoft Powerpoint training
Microsoft Word training

Time Management Course London

Interested in Access training? Please see the following pages:
microsoft access courses · microsoft training access course
microsoft+access+training · access courses in london

Training Information
AddThis Social Bookmark Button What's this?
Add to Del.icio.us Add to Facebook Add to Digg Add to Reddit Add to Google Add to Yahoo Add to Diigo Add to Mr. Wong Add to Linkarena Add to Power Oldie Add to Folkd Add to Jumptags Add to Upchuckr Add to Simpy Add to StumbleUpon Add to Slashdot Add to Netscape Add to Furl Add to Spurl Add to Blinklist Add to Blogmarks Add to Technorati Add to Newsvine Add to Blinkbits Add to Ma.Gnolia Add to Smarking Add to Netvouz