#1   Report Post  
Nigel
 
Posts: n/a
Default Exporting .xls sheet

Hi,
is there a code or can someone point me in the right direction? i have a
workbook with invoices and i need it to do the following:
1. press a button and it will copy a template and place it at the end of all
other sheets naming it in invoice numerical order ( 1234,1235,1236 etc)
2. create a link to a front page to transfer basic information ( i can do
this )
3. export the active sheet to be an independent sheet on its own in a
specific location like ( s:\invoicing\yearly invoices\month )
i have a folder in this location with sub folders ranging from April to
September 06

I am ok with code and underatand it however i just cannot seem to work out
how to do this.


help appreciated

N.S.
  #2   Report Post  
FSt1
 
Posts: n/a
Default

hi nigel,
here is some code i wrote a while back for someone needing to do about what
your are doing only with Purchase Orders (POs). It should work for invoices
also.
i'm not sure if i understand the need for step 1. you say you can do step 2.
this will do step 3.
it will require some editing to make it fit your template. there are
explainations. just change the term PO for invoice.

Sub MacCreatePO()

'Written by FSt1 on 3/14/05.

'Creates a new PO(purchase order) workbook, saving the created PO workbook
with
'the PO number as part of the file name. Leaves the "template" PO workbook
"as is".
'macCreatePO should be triggered from a button on the PO Template sheet.

Dim n As Range
Set n = Range("A1") ' the all important PO number.
'Edit PO number address to the place on your PO
template.
Application.CutCopyMode = False 'clears the clipboard
Range("A1:L25").Select 'edit to accommodate the size of your PO template
Selection.Copy
Workbooks.Add
Range("A1").PasteSpecial xlPasteAll
'Edit the file path to where you want to save the PO workbook on your PC
or
'network
ActiveWorkbook.SaveAs Filename:="H:\CodeStuff\PO" & n & ".xls",
FileFormat:= _
xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False _
, CreateBackup:=False
ActiveWorkbook.Close
Cells(1, 1).Select 'go and park at cell A1 and wait
MsgBox ("Purchase Order was saved as PO" & n & ".xls")
n.Value = n.Value + 1 'add 1 to old PO number for new PO number
'change the place of the date to add. Macro puts today's date in but
'this can be edited.
Range("I1") = Date
'clear the contents of the old PO to set up the next PO. clear
surgically so to leave
'template in tact. more clearContents commands may be needed.
'remember...this is a surgical delete. only the data and not the
template.
'the line below should be edited to fit your data.

Range("C5,C6,C8,C9,C10,E5,E6,E8,E9,E10,G5,G7,G8,G9 ,G10,F12,D13,G13").ClearContents
ActiveWorkbook.Save 'save the cleared template workbook with new(next)
PO number.
'Ready for next PO
End Sub
regards
FSt1

"Nigel" wrote:

Hi,
is there a code or can someone point me in the right direction? i have a
workbook with invoices and i need it to do the following:
1. press a button and it will copy a template and place it at the end of all
other sheets naming it in invoice numerical order ( 1234,1235,1236 etc)
2. create a link to a front page to transfer basic information ( i can do
this )
3. export the active sheet to be an independent sheet on its own in a
specific location like ( s:\invoicing\yearly invoices\month )
i have a folder in this location with sub folders ranging from April to
September 06

I am ok with code and underatand it however i just cannot seem to work out
how to do this.


help appreciated

N.S.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying Specific Values From Sheet Jenn Excel Discussion (Misc queries) 1 July 11th 05 09:22 PM
Periodically exporting Excel sheet to HTML SupportX New Users to Excel 1 July 4th 05 07:00 PM
Linking References from Multiple Sheets to One Summary Sheet Kim Setting up and Configuration of Excel 3 May 5th 05 04:56 PM
Find a non-blank cell and bring back text a in same row Rod Excel Worksheet Functions 12 March 24th 05 09:43 PM
exporting data to a secondary spread sheet Tori Excel Worksheet Functions 0 January 19th 05 03:41 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"