English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

If you have the following macro:

Sub CleanupGridReport_1()
'
' CleanupGridReport_1 Macro
' Macro recorded 12/6/2006 by me
'
'
Sheets("GridReport_1").Select
Range("V22:V29,Y22:Y29,a33:d33D32").Select
Selection.ClearContents
Range("I32").Select

End Sub

Can someone tell me what are the steps I have to follow, starting from >>

Sheets("Grid_Report_1")

So, I start the macro, then what do I do?

2006-12-06 06:43:29 · 2 answers · asked by Orange Cloud 2 in Computers & Internet Software

2 answers

Line 1: Sheets("GridReport_1").Select
Is going to select the sheet names GridReport_1
Line 2: Range("V22:V29,Y22:Y29,a33:d33...
Is to select these ranges of cells at the same time (Highlight them)
Line 3: Selection.ClearContents
Will clears the content of the selection (Contents means only whats inside the cell, not Formats or commints
Line 4: Range("I32").Select
Selects the cell I32

Thats it

good luck

Enjoy my profile, I am the VBAXLMan

2006-12-06 22:19:25 · answer #1 · answered by Anonymous · 0 0

Macros
All of a sudden, when I open the file, it asks if I want to "Enable or Disable a Macro". There are no macros in this workbook.
A macro has been added and then removed, leaving an empty module. Empty modules trigger the macro query, as does an actual macro.


Warning: As a precaution, you should make a backup copy of the file, before you remove any code.
Right click on any sheet tab and choose View Code, to open the Visual Basic Editor.



In the Project Explorer at the left of the screen, find the workbook. In the sample shown here, Book4 is the workbook name -- VBAProject (Book4)
Look for a Modules folder, and open it. (If there is no Modules folder, go to Step 6.)
For each module in the folder:
Right-click on the module name.
Choose Remove Module1 (the name of your module may be different)
Click No when asked if you want to Export.




Open the Microsoft Excel Objects folder.
For each worksheet, and for ThisWorkbook:


Double-click on the object name, to open its code module. In this sample, you'd double-click on Sheet1 (Sheet1)


On the keyboard, press Ctrl+A to select all the code (even if the code module looks empty)
Press the Delete key.






Look for a Forms folder, and open it.
Delete any UserForms that it contains.
Look for a Class Modules folder, and open it.
Delete any class modules that it contains.

Close the Visual Basic Editor.
Save the changes to the workbook.
A macro to remove all VBA code in a workbook is available
at Chip Pearson's web site:
http://www.cpearson.com/excel/vbe.htm

2006-12-06 06:46:41 · answer #2 · answered by god knows and sees else Yahoo 6 · 0 0

fedest.com, questions and answers