vba courses london - vba excel
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 » vba courses london - VBA Excel

vba courses london - VBA Excel

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

resolvedResolved · Low Priority · Version Standard

VBA Excel

Simon has attended:
Excel VBA course

by - delegate Simon [4 posts] (2006 Nov 30 Thu, 17:00) replyReply

During the VBA course with Carlos he indicated that you could run a macro and prevent the screen from flickering (i.e while it was calculating). Can you please let me know how to do this?

VBA Excel Stop Flickering Screen

by - trainer Carlos gold contributer[479 posts] (2006 Dec 1 Fri, 11:14) replyReply

Running VBA code may cause the screen to flicker as the monitor is the slowest part of the program and cannot keep up with the very fast changes taking place.

To switch off the screen until the program is run enter the following code line at the beginning of the procedure:

Application.ScreenUpdating = False

The screen comes on automatically on completion of the program. If you require screen updating to resume before the end type


Application.ScreenUpdating = True

RE: VBA Excel

by - delegate Simon [4 posts] (2007 Feb 27 Tue, 15:41) replyReply

I have a question regarding creating an input box to select a particular worksheet (tab).

Each month I move and copy several worsheets to a new worbook and save them as values only so that I can distribute them as reports. All bar one of the worksheets are the same for each month. For the particular worksheet that varies from month to month I want to be able to create an input box so that I can select the worksheet relevant to the particular month. Below I have included the code that I have recorded. You will notice that in the macro the worksheet that I have selected for this month is "M1". Next month I want this to be "M2" and then the month after "M3" and so forth. Do I have to declare "M1" to be a variant? Can you please help me with code?

Thanks Simon Gleeson Ph: 02077667200

Sub Create_Month_End()
'
' Create_ME Macro
' Simon Gleeson
'

Outcome = MsgBox("Are you sure you want to create the Month End Report?", vbYesNo, "Month End Report")
If (Outcome = 6) Then
Sheets(Array("Cover Page", "Commentary", "M1")).Select
Sheets("Cover Page").Activate
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
Sheets(Array("Cover Page", "Commentary", "M1", "YTD", "Global Analytics")).Select
Sheets("Global Analytics").Activate
Sheets(Array("Cover Page", "Commentary", "M1", "YTD", "Global Analytics")).Copy
ActiveSheet.Shapes("Button 1").Select
Selection.Delete
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("A1").Select
Selection.ClearContents
Sheets("Commentary").Select
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("A1").Select
Selection.ClearContents
Sheets("M1").Select
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Columns("B:D").Select
Selection.EntireColumn.Hidden = True
ActiveSheet.Outline.ShowLevels RowLevels:=1
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 21
ActiveWindow.SmallScroll Down:=-216
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 7
Columns("A:A").Select
Selection.ClearContents
Rows("4:7").Select
Selection.Delete Shift:=xlUp
Range("A1").Select
Sheets("YTD").Select
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Columns("B:D").Select
Selection.EntireColumn.Hidden = True
Columns("A:A").Select
Selection.ClearContents
Range("A2").Select
ActiveSheet.Outline.ShowLevels RowLevels:=1
Rows("4:7").Select
Selection.Delete Shift:=xlUp
Range("A1").Select
Sheets("Global Analytics").Select
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Columns("B:D").Select
Selection.EntireColumn.Hidden = True
Columns("A:A").Select
Selection.ClearContents
Range("A1").Select
ActiveSheet.Outline.ShowLevels RowLevels:=1
Rows("18:21").Select
Selection.Delete Shift:=xlUp
Range("A1").Select
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("Cover Page").Select
ActiveWorkbook.SaveAs Filename:= _
"S:\London Office\All Files\Finance\Management Accounts\SG Management Accounts.xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
, CreateBackup:=False
Windows("Group GLOBAL Analytics 2007 Template 19 Feb 2007.xls").Activate
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("Cover Page").Select
Range("A1").Select
End If
End Sub

RE: VBA Excel

by - trainer Carlos gold contributer[479 posts] (2007 Mar 5 Mon, 09:51) replyReply

Hi Simon

Sorry for the delay.

Yes. If you are changing the sheet monthly you need to replace the "M1" value in the code with a variable (As next month it will be "M2")

eg. dim MonthName as String

Then create either an input box or a form to that asks the user to enter the name of the new monthly sheets as required. This entry gets saved in MonthName.

This inputbox/Form is activated if Outcome=6


Related articles

· What Is Microsoft Excel VBA and How Can It Help You Work Smarter?
· Visual Basic Returns To The Macintosh
· Introduction to Visual Basic for Applications
· How To Find A Good VB For Access Trainer
· Should You Send Managers To VBA Training?

Vba tip:

Use GoTo to Select A Cell With VBA

To select a certain cell on a Worksheet you can use:

Application.Goto Reference:=Range("V300")

or more simply

Range("V300").Select

If, on the other hand, you want the selected cell to be the top/left cell on the screen you use:

Application.Goto Reference:=Range("V300"), Scroll=True

View all VBA hints and tips

Rate this page:
4.0/5 (3 votes cast)
Institute of IT Training - Accredited Training Provider Microsoft Certified Partner
microsoft office
Microsoft Office Specialist Authorised Testing Centre (MOS and MCAS)

Prodigy Platinum Learning Partner

Institute of IT Training - Accredited Training Provider 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

Training Articles

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