Results 1 to 4 of 4

Change textbox backcolor then save workbook?

Threaded View

  1. #1
    Forum Contributor
    Join Date
    09-23-2007
    Location
    Melbourne, Australia
    Posts
    176

    Change textbox backcolor then save workbook?

    Hi

    When I try to use the code below the backcolor of the textbox does not change until the workbook is saved. I want the textbox to change colour when the save button has been hit on the userform. I would then have another set of code to change the colour back to its original colour once the workbook has been saved. I can't get any colours to change until the macro finishes running. Is this a timing problem?

    Thanks in advance.

    Private Sub CommandButton1_Click()
     
    UserForm1.TextBox1.BackColor = vbRed
     
     
    Workbooks("testbook").save
     
    'here I change the textbox backcolor to black again
     
    UserForm1.TextBox1.BackColor = vbblack
     
    End Sub
    Last edited by VBA Noob; 11-17-2008 at 09:52 AM.

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