Results 1 to 4 of 4

Userform Textbox Exit Event to Run Application

Threaded View

  1. #1
    Registered User
    Join Date
    08-04-2010
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    34

    Userform Textbox Exit Event to Run Application

    I have this code that should update textPERC everytime i exit another Textbox...

    Sub TextMOTid_exit(ByVal Cancel As MSForms.ReturnBoolean)
    Application.Run = percupdate()
    End Sub
    
    Sub percupdate()
     'UserFORM Percentage
    
        With textPERC
            'Set the text of the label.
                 textPERC.Caption = Format(expression:=Sheet1.Range("A3"), Format:="0.00%")
            'Automatically size the label control.
                 .AutoSize = True
                 .WordWrap = False
            'Set the font used by the Label control.
                 .Font.Name = "Tahoma"
        End With
    End Sub
    However on exit i get the following error...
    'Compile Error:
    Expected Function or Variable'

    Probably something simple!!
    Last edited by baisty182; 11-29-2010 at 12:31 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