View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Don[_25_] Don[_25_] is offline
external usenet poster
 
Posts: 3
Default Inserting a function

I have a spreadsheet with a variety of formulas on it that I now need
to round to thousands. I tried to build a macro that edits the
selected cell and inserts the Round function around the existing
formulas as follows

Public Sub AddRound()

SendKeys ("{F2}")
SendKeys ("{HOME}")
SendKeys ("=round(")
SendKeys ("{END}")
SendKeys (",)")
SendKeys ("{ENTER}")


End Sub

I get and invalid procedure call error message. Any suggestions and is
this a good approach?

Thanks
Don