Results 1 to 5 of 5

Run code when open file

Threaded View

zaasrvr Run code when open file 09-19-2007, 03:19 PM
royUK Use the WorkBook_Open event ... 09-19-2007, 03:33 PM
zaasrvr yes, error show 09-19-2007, 03:44 PM
royUK This needs to be copied to a... 09-19-2007, 03:57 PM
zaasrvr thanks 09-19-2007, 04:03 PM
  1. #1
    Registered User
    Join Date
    09-19-2007
    Posts
    8

    Run code when open file

    I need run this code when the file is opening:

    Sub Remove_Formula_Errors()
    Dim rng As Range, cell As Range, fmla As String
    Set rng = Cells.SpecialCells(xlCellTypeFormulas, 16)
    For Each cell In rng
    fmla = Right(cell.Formula, Len(cell.Formula) - 1)
    cell.Formula = "=if(iserror(" & fmla & "), """"," & fmla & ")"
    Next
    End Sub
    Any idea?

    Thanks
    Last edited by VBA Noob; 09-19-2007 at 03:26 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1