A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

opening and editing excel



 
 
Thread Tools Display Modes
  #1  
Old February 16th, 2007, 12:25 PM posted to microsoft.public.access.forms
Apples76
external usenet poster
 
Posts: 47
Default opening and editing excel

I have recorded the following macro from Excel, and wish to run it from a
button on a form.

could someone please show me how to convert the code so i can use it in
Access.


Thanks

ChDir "U:\Technology\opsdelivery\Area Team Finance\PO Reports"
Workbooks.Open Filename:= _
"U:\Technology\opsdelivery\Area Team Finance\PO Reports\Latest PO
Report - UK West CSR 1 to 5999.xls"
Rows("1:4").Select
Range("A4").Activate
Selection.Delete Shift:=xlUp
Range("B8").Select
ChDir "I:\Netcon North\GUK West\Nom & Build trackers\Finance"
ActiveWorkbook.SaveAs Filename:= _
"I:\Netcon North\GUK West\Nom & Build trackers\Finance\Copy of
Latest PO Report - UK West CSR 1 to 5999.xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False

ActiveWorkbook.Close

ChDir "U:\Technology\opsdelivery\Area Team Finance\PO Reports"
Workbooks.Open Filename:= _
"U:\Technology\opsdelivery\Area Team Finance\PO Reports\Latest PO
Report - UK West CSR 6000 to 12999.xls"
Rows("1:4").Select
Range("A4").Activate
Selection.Delete Shift:=xlUp
Range("B8").Select
ChDir "I:\Netcon North\GUK West\Nom & Build trackers\Finance"
ActiveWorkbook.SaveAs Filename:= _
"I:\Netcon North\GUK West\Nom & Build trackers\Finance\Copy of
Latest PO Report - UK West CSR 6000 to 12999.xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False

ActiveWorkbook.Close

ChDir "U:\Technology\opsdelivery\Area Team Finance\PO Reports"
Workbooks.Open Filename:= _
"U:\Technology\opsdelivery\Area Team Finance\PO Reports\Latest PO
Report - UK West CSR 13000 to 20999.xls"
Rows("1:4").Select
Range("A4").Activate
Selection.Delete Shift:=xlUp
Range("B8").Select
ChDir "I:\Netcon North\GUK West\Nom & Build trackers\Finance"
ActiveWorkbook.SaveAs Filename:= _
"I:\Netcon North\GUK West\Nom & Build trackers\Finance\Copy of
Latest PO Report - UK West CSR 13000 to 20999.xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False

ActiveWorkbook.Close

ChDir "U:\Technology\opsdelivery\Area Team Finance\PO Reports"
Workbooks.Open Filename:= _
"U:\Technology\opsdelivery\Area Team Finance\PO Reports\Latest PO
Report - UK West CSR 21000 and above.xls"
Rows("1:4").Select
Range("A4").Activate
Selection.Delete Shift:=xlUp
Range("B8").Select
ChDir "I:\Netcon North\GUK West\Nom & Build trackers\Finance"
ActiveWorkbook.SaveAs Filename:= _
"I:\Netcon North\GUK West\Nom & Build trackers\Finance\Copy of
Latest PO Report - UK West CSR 21000 and above.xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False

ActiveWorkbook.Close
 




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:03 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.