Code Assistance Required

Keith24249

New Member
Joined
Jun 18, 2011
Messages
21
Hi,

I am using the attached workbook as a template when we are asked by customers to issue a quote. The code currently in the workbook changes the quote number every time the template is saved. This aspect is fine. The problem I want a cure for is as follows. When the information has been entered into the Quote worksheet it will be "saved as" a work order in the customers folder. After it has been saved to the folder it may be opened several times, the problem occurs everytime the work book is opened as the quote number keeps changing by an increment of one.
What I think I need is an addition to the code that will allow the workbook to keep its assigned number when created but does not change when the workbook is continually opened. I hope I have explained this sufficiently clear enough to give you guys a fighting cahnce. I am new to code and the code contained within the workbook has been downloaded from links I have been sent after previous posts. I didn't write any of it, please make your responses easy to understand
Regards
Keith
 
Last edited:

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Hi,

The code I am using at the moment is as follows:

Private Sub Workbook_Open()
Worksheets("QUOTE").Range("H2") = Worksheets("DATA").Cells(2, "E").Value
Worksheets("DATA").Cells(2, "E").Value = Worksheets("DATA").Cells(2, "E").Value + 1
End Sub

Regards
Keith
 
Upvote 0
Can you post the code that you are using to open that workbook - the remedy lies therein.
 
Upvote 0
Hi,

I don't have any other code except the code that allows me to email the active worksheet. I normally open the workbook by double clicking on the template icon which is on my desktop. Hope this helps

Regards
Keith
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,753
Members
452,940
Latest member
rootytrip

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top