View Single Post
  #5   Report Post  
Dave Peterson
 
Posts: n/a
Default

If you save that workbook to your xlstart folder, then each time you start
excel, this workbook will be opened (and the macro will be available).

Lots of people use a workbook with the name of personal.xls for this kind of
thing.

And they'll even make it so that personal.xls workbook is hidden--so it doesn't
get in the way when you're swapping between workbooks.

Brett wrote:

I like the code. Thanks.

I opened the VB Editor and pasted into spreadsheet1. I can save it as an
xls file. However, when I reopen Excel and do alt+F8, the Macro won't be
listed there. How do I have it listed it in the Macro section everytime I
open Excel on this machine?

Is there a way to create a keyboard shortcut to it?

Also, could you do a little line by line describing of what the is doing?

Thanks,
Brett

"Jason Morin" wrote in message
...
You could record a macro under Tools Macros to do this,
or try this:

Sub DeleteParen()
Dim ws As Worksheet
Dim rng1 As Range
Dim rng2 As Range
Dim rng3 As Range
Set ws = ActiveSheet
With ws
Set rng1 = .Range("A:A")
Set rng2 = .UsedRange
End With
Set rng3 = Application.Intersect(rng1, rng2)
With rng3
.Replace What:="(", Replacement:="", LookAt:=xlPart
.Replace What:=")", Replacement:="", LookAt:=xlPart
End With
Range("A:A").NumberFormat = "General"
End Sub

---
HTH
Jason
Atlanta, GA



-----Original Message-----
Not sure if this is the correct group. Please advise me

if not.

What will a VBA macro look like that removes all

parentheses from the first
column of an Excel worksheet and then sets the format

for that column to
"general"?

Thanks,
Brett


.


--

Dave Peterson