Results 1 to 2 of 2

Hide Macro Buttons After Saving / Limit File Size

Threaded View

  1. #1
    Registered User
    Join Date
    12-31-2010
    Location
    Kathleen, Georgia
    MS-Off Ver
    Excel 2003
    Posts
    27

    Hide Macro Buttons After Saving / Limit File Size

    I am almost complete on an application I am trying to build for my job. Almost complete thanks to members of this site who have provided me with help. Trying to put some finishing touches on the worksheet but need some more guidance...

    Here's where I'm stuck...
    1) I have a macro button for saving, that when executed takes a worksheet ("OPL") from a workbook and saves a copy as a standalone file in a different folder. There are 2 macro buttons on the original file. Is there a way to remove these button or hide them on the newly created workbook?

    2) Can anyone tell me how to limit a file size? My application is a form that users enter data into. I don't want them attaching a 10 meg picture file into the form.

    3) When the original workbook is saved a new workbook is created. Right now the new workbook closes and the original stays open. How do I change that? I am trying to get the original workbook to close and the new workbook to stay open.

    Hope this makes sense to anyone reading it. Way past my bedtime.

    Thanks

    Public Sub SaveAsA1()
    
    Dim wbName As String
    Dim ext As String
        
        ext = "S:\PROJECTS\Bakery Maint\ONE POINT LESSONS\"
        wbName = Sheets("OPL").Range("A1").Value
        Sheets("OPL").Copy
        ActiveWorkbook.SaveAs Filename:=ext & wbName
        ActiveWorkbook.SendMail "[email protected]", "New OPL"
        ext = ActiveWorkbook.FullName
        ActiveWorkbook.Close
        
    Dim wsMstr As Worksheet:    Set wsMstr = ThisWorkbook.Sheets("OPL")
    Dim wsDtBs As Worksheet:    Set wsDtBs = ThisWorkbook.Sheets("OPL DATABASE")
    Dim NR As Long:             NR = wsDtBs.Range("B:B").SpecialCells(xlCellTypeBlanks).Cells(1).Row
    
        wsMstr.Range("N3:AA3").Copy
        wsDtBs.Range("B" & NR).PasteSpecial xlPasteValuesAndNumberFormats
        wsDtBs.Range("P" & NR).FormulaR1C1 = "=HYPERLINK(""" & ext & """, RC15)"
    
    
    End Sub
    Forgot to attach my workbook for anyone who wants to take a look..thx
    Attached Files Attached Files
    Last edited by pike; 01-23-2011 at 03:13 AM. Reason: reset replies

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