Do you want to make your macro pause the screen so that you do not see what is happening till it’s done? This will prevent seeing all the jumping between sheets & scrolling.
Application.ScreenUpdating = False
Do you want to make your macro pause the screen so that you do not see what is happening till it’s done? This will prevent seeing all the jumping between sheets & scrolling.
Application.ScreenUpdating = False
Enable/Disable alerts in a macro
Disable
Application.DisplayAlerts = False
Enable
Application.DisplayAlerts = True
Run a Macro when a workbook opens (must be placed in the “ThisWorkbook” Object):
Private Sub Workbook_Open()
MsgBox “Auto Calculation has been disabled.”
Application.Calculation = xlCalculationManual
End Sub
Paste Values only from current clipboard contents:
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False
Switch to a different open workbook:
Windows(“file name.xlsm”).Activate
Clear the contents of the selected cells:
Selection.ClearContents
Open a workbook with a filenamelocation that is configured from another cell value:
ChDir “C:Usersuser_namefolder_onefolder_two”
Workbooks.Open Filename:= _”C:Usersuser_namefolder_namePart_of_file_name1″ & variable & “.xls”
Set a variable to a value in a cell(X=Row,Y=Column):
variable_name = Worksheets(“sheet_name”).Cells(X, Y).Value
Clear the clipboard:
Application.CutCopyMode = False
Select all cells that currently have data from a starting point “F1”:
Range(“F1”).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
You must be logged in to post a comment.