101 Ready-To-Use Excel Macros by Michael Alexander

101 Ready-To-Use Excel Macros by Michael Alexander

Author:Michael Alexander
Language: eng
Format: epub, pdf
Publisher: Wiley
Published: 2012-05-30T00:00:00+00:00


Sub Macro50()

‘Step 1: Declare your variables

Dim MyRange As Range

Dim MyCell As Range

‘Step 2: Save the Workbook before changing cells?

Select Case MsgBox(“Can't Undo this action. “ & _

“Save Workbook First?”, vbYesNoCancel)

Case Is = vbYes

ThisWorkbook.Save

Case Is = vbCancel

Exit Sub

End Select

‘Step 3: Define the target Range.

Set MyRange = Selection

‘Step 4: Start looping through the range.

For Each MyCell In MyRange



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.