Results 1 to 3 of 3

two Macro’s below into One Button

Threaded View

  1. #1
    Registered User
    Join Date
    07-28-2010
    Location
    boston mass
    MS-Off Ver
    Excel 2003
    Posts
    6

    two Macro’s below into One Button

    I Need to combine the two Macro’s below into One Button: Because I change the name of the Workbook each time I use it I can’t use:

    Application.Run "'G BAKER ESTIMATING FORM.xls'!SAVEDATA2"
        ActiveWindow.SmallScroll Down:=12
        Application.Run "' G BAKER ESTIMATING FORM.xls'!savedata"
        Range("L8").Select


    Sub SAVEDATA2()
    '
    ' SAVEDATA2 Macro
    ' Macro recorded 03/24/2010 by Gary W. Baker
    ' Keyboard Shortcut: Ctrl+s
    '
        Dim row, rwindex As Integer
        row = 0
        rwindex = 5
        Range("U14:BO14").Select
        Selection.Copy
        Sheets("DATA").Select
        Range("C1").Select
        Do
           ActiveCell.Offset(1, 0).Activate
                 
        Loop Until ActiveCell.Value = ""
        
        Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
            False, Transpose:=False
        Sheets("To CUSTOMER").Select
        Application.CutCopyMode = False
        Range("l8").Select
    End Sub
    ,
    Sub savedata()
    '
    ' save Macro
    ' Macro recorded 3/08/2010 by Gary Baker
    '
    ' Keyboard Shortcut: Ctrl+s
    '
        Dim row, rwindex As Integer
        row = 0
        rwindex = 5
        Range("U14:BO14").Select
        Selection.Copy
        Workbooks.Open Filename:=" W:\Other\ESTIMATE REPORTS\ESTIMATE DATA.xls"
        Sheets("DATA").Select
        Range("C1").Select
    
        Do
           ActiveCell.Offset(1, 0).Activate
                 
        Loop Until ActiveCell.Value = ""
        
        Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
            False, Transpose:=False
            Range("A1").Select
        ActiveWorkbook.Close
        Application.CutCopyMode = False
        Range("l8").Select
    End Sub
    Last edited by GWB Daniels; 07-28-2010 at 02:09 PM.

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