Results 1 to 5 of 5

Run code each time form is opened

Threaded View

  1. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: Run code each time form is opened

    It should be UserForm_Activate, not formname_Activate.
    Public Sub UserForm_Activate() 
    Dim celltxt As String
    
        celltxt = ActiveSheet.Range("E9").Value
    
        If InStr(celltxt, "SSS1B") Then
              CheckBox1.Value = True
        Else
            CheckBox1.Value = False
        End If
        
    End Sub
    Last edited by Norie; 07-01-2014 at 11:17 AM.
    If posting code please use code tags, see here.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to set a Global Macros so that it gets opened every time an excel file is opened?
    By pericopericone in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-09-2013, 05:53 AM
  2. [SOLVED] VBA Code open files in folder, copy text to workbook-Next time folder opened copy only new
    By Bikeman in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-02-2013, 07:59 PM
  3. Loading a user form crashes Excel 2003 -- the second time it's opened
    By Bob Eaton in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-23-2012, 07:19 PM
  4. Access - run code once form is opened
    By adgjqetuo in forum Access Programming / VBA / Macros
    Replies: 3
    Last Post: 12-07-2010, 02:54 AM
  5. [SOLVED] how can I make a form number change everytime the form is opened
    By babydumplingspita in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-10-2005, 03:05 PM

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