ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Building a quoting / invoicing system. (https://www.excelbanter.com/excel-programming/389404-building-quoting-invoicing-system.html)

JonathanW

Building a quoting / invoicing system.
 
Hi I am putting the finishing touches on my quote system. Basically users
input the into one sheet, and which does the maths copies it over to the
'quote builder' sheet. I am looking for a failproof way that multiple users
can file the quotes, that automatically saves just the quote sheet into a
folder that automatically names the quote properly. I want to make sure that
quotes are all logically stored.

I found this code from a previous post, however there are a couple of things
wrong that I can't fix. My knowledge in programming is most basic, so any
help please talk to me like I'm an idiot.

Firstly I can't get the copied worksheet to save into the test folder, its
not saving anywhere.

Also I'd like to bring all the formatting over, rather than just the text,
is there anyway of doing that. The current quote builder sheet had a company
image so I want it to be copied exactly.

By the way C4 is the quote number
B12 is the business name

Sub MacCreatePO()

Dim n As Range
Dim s As Range
Set n = Range("C4")
Set s = Range("B12")
Application.CutCopyMode = False
Range("A1:C70").Select
Selection.Copy
Workbooks.Add
Range("A1").PasteSpecial xlPasteAll
ActiveWorkbook.SaveAs Filename = "C:\Documents and
Settings\Administrator\Desktop\test\" & n & s & ".xls"
ActiveWorkbook.Close
Cells(1, 1).Select
MsgBox ("Quotation for " & s & " was saved as Quote " & n & " " & s &
".xls")
n.Value = n.Value + 1
Range("I1") = Date
ActiveWorkbook.Save

End Sub


Carl Hartness[_2_]

Building a quoting / invoicing system.
 
try ":=", as in Filename:="xxx"
Since the first SaveAs parameter is FileName, you will probably find a
file named "FALSE.xls" in your default folder (my default folder is
"My Documents").

Carl

On May 15, 1:24 am, JonathanW
wrote:
Hi I am putting the finishing touches on my quote system. Basically users
input the into one sheet, and which does the maths copies it over to the
'quote builder' sheet. I am looking for a failproof way that multiple users
can file the quotes, that automatically saves just the quote sheet into a
folder that automatically names the quote properly. I want to make sure that
quotes are all logically stored.

I found this code from a previous post, however there are a couple of things
wrong that I can't fix. My knowledge in programming is most basic, so any
help please talk to me like I'm an idiot.

Firstly I can't get the copied worksheet to save into the test folder, its
not saving anywhere.

Also I'd like to bring all the formatting over, rather than just the text,
is there anyway of doing that. The current quote builder sheet had a company
image so I want it to be copied exactly.

By the way C4 is the quote number
B12 is the business name

Sub MacCreatePO()

Dim n As Range
Dim s As Range
Set n = Range("C4")
Set s = Range("B12")
Application.CutCopyMode = False
Range("A1:C70").Select
Selection.Copy
Workbooks.Add
Range("A1").PasteSpecial xlPasteAll
ActiveWorkbook.SaveAs Filename = "C:\Documents and
Settings\Administrator\Desktop\test\" & n & s & ".xls"
ActiveWorkbook.Close
Cells(1, 1).Select
MsgBox ("Quotation for " & s & " was saved as Quote " & n & " " & s &
".xls")
n.Value = n.Value + 1
Range("I1") = Date
ActiveWorkbook.Save

End Sub





All times are GMT +1. The time now is 08:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com