Results 1 to 9 of 9

Auto Open and Auto Close Macro

Threaded View

  1. #1
    Registered User
    Join Date
    02-05-2013
    Location
    Cardiff
    MS-Off Ver
    Excel 2010
    Posts
    18

    Exclamation Auto Open and Auto Close Macro

    PHP Code: 
    [B]Sub auto_open()
    '
    auto_open Macro
    '
                        MsgBox ("Welcome to Sabz Cupcakes Workbook")
                        Sheets("MainMenu").Visible = False
                        Sheets("CustomerInput").Visible = False
                        Sheets("ExistingCustomer").Visible = False
                        Sheets("OrderInput1").Visible = False
                        Sheets("OrderInput2").Visible = False
                        Sheets("Basket").Visible = False
                        Sheets("Invoice").Visible = False
                        Sheets("CustomerHistory").Visible = False
                        Sheets("OrderHistory").Visible = False
                        Sheets("Summary").Visible = False
                        Sheets("Chart1").Visible = False
                        Sheets("Chart2").Visible = False
                        Sheets("Chart3").Visible = False
                        Sheets("RawData").Visible = False
                        
        Sheets("(Correct)").Select
        Range("G13,G15").Select
        Range("G15").Activate
        Selection.ClearContents
        Range("G13").Select
        Sheets("(Correct)").Select
        Range("G15").Select

    End Sub

    ___________________________________________________________________________________________

    Sub auto_close()
    '
    ' auto_close Macro

                        MsgBox ("Thank You for using Sabz Cupcakes Workbooks")
                        Sheets("(Correct)").Select
                        Range("G13,G15").Select
                        Range("G15").Activate
                        Selection.ClearContents
                        Range("G13").Select
                        Sheets("MainMenu").Visible = True
                        Sheets("CustomerInput").Visible = True
                        Sheets("ExistingCustomer").Visible = True
                        Sheets("OrderInput1").Visible = True
                        Sheets("OrderInput2").Visible = True
                        Sheets("Basket").Visible = True
                        Sheets("Invoice").Visible = True
                        Sheets("CustomerHistory").Visible = True
                        Sheets("OrderHistory").Visible = True
                        Sheets("Summary").Visible = True
                        Sheets("Chart1").Visible = True
                        Sheets("Chart2").Visible = True
                        Sheets("Chart3").Visible = True
                        Sheets("RawData").Visible = True

    End Sub[/B] 

    I am ever so sorry for Including two very lengthy Macros, however i did not know how else to go about this problem. Basically, when i close and re-open the workbook, 5 sheets do not appear, which are the - ExistingCustomer, Sumarry, Chart1, Chart2, Chart3. Can anyone tell me why this is and please provide me with a solution?
    Last edited by SaleenaKhan; 02-13-2013 at 10:14 AM.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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