Results 1 to 3 of 3

running a private sub macro

Threaded View

  1. #1
    Registered User
    Join Date
    05-19-2012
    Location
    philippines
    MS-Off Ver
    Excel 2007
    Posts
    11

    running a private sub macro

    hello everyone, i have been searching the internet for an answer for my problem... i have a macro that shows a user form and asks the user to fill up certain fields. there is one point wherein i want to automatically get the total of all numeric data entered in assigned textboxes. I tried running the application through calling another macro everytime a textbox gets updated. but there is always a problem... my sample code is shown below... i hope someone can help me with this one.
    Private Sub TextBox9_afterupdate()
        Dim num(1 To 9) As Currency
            num(1) = TextBox9.Value
            TextBox13.Value = num(1)
        TextBox9.Value = Format(TextBox9.Value, "#,###.#0")
        TextBox13.Value = Format(TextBox13.Value, "#,###.#0")
        Application.run "'sample.xls'!runtotal"
    End Sub
    everytime i run the macro, i get runtime error '1004'....
    Last edited by Leith Ross; 05-24-2012 at 08:47 PM. Reason: Added Code Tags

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