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

As below:

Sub ConvertToNumbers()
Cells.SpecialCells(xlCellTypeLastCell) _
.Offset(1, 1).Copy
Selection.PasteSpecial Paste:=xlPasteValues, _
Operation:=xlPasteSpecialOperationAdd
With Selection
.VerticalAlignment = xlTop
.WrapText = False
End With
Selection.EntireColumn.AutoFit
End Sub

2007-03-06 22:25:08 · 2 answers · asked by VBproblem 1 in Computers & Internet Software

2 answers

Alt-F8 (Menu alternative: Tools/Macros..../Macros)

Type in a name for the macro (you have ConvertToNumbers above).

Click the Create button.

Paste the text in the VB window that opens. Delete any redundant Sub and End Sub lines

Click the save button, and close the VB window.

2007-03-06 22:36:49 · answer #1 · answered by JustAnotherEngineer 3 · 0 0

Follow these steps:

Tools->Macro->Record New Macro
Press Enter to accept defaults. Or write name of your function. This will start recording new macro.
Just click on recording toolbar's stop button to stop recording.
Go to: Tools->Macro->Visual Basic Editor
Open Modules->Module1
You will see a blank body of function/module. There you should paste the statements of your procedure.
Go back to Excel view and execute your macro thru same Tool->Macro menu option. You can also assign a keyboard shortcut to execute your function. I hope this helps.

2007-03-07 06:39:55 · answer #2 · answered by irf 4 · 0 0

fedest.com, questions and answers