OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Corel User Forums > Corel PHOTO-PAINT > Macros/Add-ons

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 28-07-2010, 08:48
GWB Daniels
Guest
 
Posts: n/a
Default 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
Reply With Quote
  #2  
Old 29-07-2010, 00:53
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 9
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Excel

You can simply copy the SAVEDATA2 sub to the other Excel document. Then you would be able to call it from savedata or just copy the code and past it to the end of savedata. That would work also.

-Shelby
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Combine Textrows... WernerHo Macros/Add-ons 6 15-12-2009 11:44
Adding a button to toolbars to run a VBA macro Alex FAQ 4 10-05-2007 09:07
Cancelling a macro when hitting the "Cancel" button annedeblois CorelDRAW/Corel DESIGNER VBA 1 23-03-2006 17:05
Corel 9 VBA Weld and Combine korner CorelDRAW/Corel DESIGNER VBA 2 07-10-2004 11:48
ESC button..... ESC!!! dungbtl General 0 28-08-2004 16:39


All times are GMT -5. The time now is 05:17.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com