Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
11 views

A-List-of-Excel-VBA-Commands

Uploaded by

Sebastián Emdef
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

A-List-of-Excel-VBA-Commands

Uploaded by

Sebastián Emdef
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

A List of Most Commonly Used VBA Commands in Excel

Range and Cell Selection PivotTables


Returns a collection of all the PivotTables in a
Range() Selects a range of cells in a worksheet. PivotTables()
worksheet.
Returns a collection of all the PivotCharts in a
Cells() Returns a specific cell or a range of cells. PivotCharts()
worksheet.
Returns the active cell, which is the Returns a collection of all the PivotFields in a
ActiveCell PivotFields()
currently selected cell in a worksheet. PivotTable.
Returns a range of cells that is offset
Offset() RefreshTable() Refreshes the data in a PivotTable.
from a given range.
PivotSelect() Selects a range in a PivotTable.
Clipboard PivotLayout() Sets the layout of a PivotTable.
Copies the selected range to the PivotTableWizar Displays the PivotTable and PivotChart Wizard
Copy()
Clipboard. d() dialog box.
Pastes the contents of the Clipboard into
Paste()
the selected range.
Charts
Returns the active chart, which is the currently
Worksheets and Sheets ActiveChart
selected chart in a worksheet.
Returns a collection of all the Returns a collection of all the chart objects in a
Worksheets() ChartObjects()
worksheets in a workbook. worksheet.
Returns the active worksheet, which is
SeriesCollection(
ActiveSheet the currently displayed worksheet in a Returns a collection of all the series in a chart.
)
workbook.
Returns a collection of all the sheets in a
Sheets() workbook, including chart sheets and ChartTitle Represents the title of a chart.
other sheet types.
Protects a worksheet or workbook
Protect ChartType Sets or returns the chart type for a chart.
structure with a password.
Removes password protection from a Sets the appearance of a chart element, such as
Unprotect SetElement
worksheet or workbook structure. the chart title or axis labels.

Workbooks Miscellaneous
Returns a collection of all the open Displays a message box with a message and
Workbooks() MsgBox
workbooks. optional buttons and icons.
Returns the active workbook, which is
ActiveWorkbook InputBox Displays an input box to get input from the user.
the currently displayed workbook.
Creates a reference to an external object or
Saves a workbook with a different file
SaveAs() CreateObject application, such as a Word document or an
name or format.
Outlook email message.
Open() Opens a workbook from a file path. Shell Runs an external program or command.
Saves changes to a workbook or a copy
Save of a workbook with a new name or Timer Returns the number of seconds since midnight.
location.
Returns the value of an environment variable,
Close Closes a workbook. Environ such as the user's username or the path to the
Windows directory.
Returns a reference to the workbook
ThisWorkbook that contains the VBA code that is ClearContents() Clears the contents of the selected range.
currently running.
A List of Most Commonly Used VBA Commands in Excel

Data Validation

DataValidation Adds data validation to a range of cells in a worksheet.

ValidationType Sets or returns the type of data validation to apply to a range of cells.

InputTitle Sets or returns the title of the input message that appears when a user selects a cell with data validation.

InputMessage Sets or returns the text of the input message that appears when a user selects a cell with data validation.

Sets or returns the title of the error message that appears when a user enters invalid data in a cell with data
ErrorTitle
validation.

Sets or returns the text of the error message that appears when a user enters invalid data in a cell with data
ErrorMessage
validation.

ShowInput Determines whether to display the input message when a user selects a cell with data validation.

ShowError Determines whether to display the error message when a user enters invalid data in a cell with data validation.

InCellDropdown Determines whether to display a dropdown arrow in cells with data validation that allow a list.

IgnoreBlank Determines whether to allow blank cells when validating data.

Formula1 Sets or returns the first value or expression to use in a data validation rule.

Formula2 Sets or returns the second value or expression to use in a data validation rule, if applicable.

Add Adds a data validation rule to a range of cells.

Modify Modifies an existing data validation rule for a range of cells.

Delete Deletes the data validation rule for a range of cells.

Excelgraduate
© 2023 excelgraduate.com | All rights reserved.

You might also like