Results 1 to 3 of 3

Activate worksheet

Threaded View

jwongsf Activate worksheet 04-09-2009, 11:26 AM
stanleydgromjr Re: Activate worksheet 04-09-2009, 05:11 PM
jwongsf Re: Activate worksheet 04-10-2009, 09:11 AM
  1. #1
    Registered User
    Join Date
    07-16-2007
    Location
    San Francisco, CA
    MS-Off Ver
    2010
    Posts
    93

    Activate worksheet

    I do not know if I have this written correctly, I would like to have the sub - Retro run whenever some one opens this worksheet - "FORM". The retro is also suppose to test cell H12 to see if it is blank before running the msgbox, Can any one help me with this,,,


    Private Sub workbook_sheetactivate(ByVal SH As Object)
    If TypeName(SH) = "Worksheet" Then Retro
    Range(a1).Select
    
    End Sub
    
    Private Sub Retro()
    ' if statement to check H12 to see if blank, if blank then preceed if not then exit.
    
    
    ans = MsgBox("Is this Funding Change Retro?", vbYesNo)
        Select Case ans
            Case vbYes
                 Sheets("Funding Source Change Form").Select
                 Range("F5").Select
                ActiveCell.FormulaR1C1 = "X"
                Range("H12").Select
                Exit Sub
            Case vbNo
                 Range("h12").Select
            Exit Sub
         End Select
    End Sub
    Last edited by jwongsf; 04-10-2009 at 09:12 AM. Reason: works great...

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