473,395 Members | 1,454 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Simple stock taking spreadsheet?

Hi all..

I hope this is in the right section, forgive me if it is not.

I am trying to make a simple stock taking spreadsheet. In column A I will have all of my items. Then the next two items will be Balance, Stock Taken, Stock recieved.. This will be repeated 6 times (Monday to Saturday). But I would like to save this as a template. So the balances that appear in the last Balance column, I would like that to appear in the first balance column at the start of the new week.

So is it possible to have a button where when you click it, it will open up a new template with the end week balances as the first balance in the new week? And is it possible to have the default file name as the week ending date (Saturday's Date).

Thanks
Apr 8 '11 #1
1 3722
Guido Geurs
767 Expert 512MB
This will copy the last Saterday in a new workbook and save it with the date of next saterday. (see attachment for demo)

Expand|Select|Wrap|Line Numbers
  1. Private Sub CommandButton1_Click()
  2. Dim NEWBOOK As Workbook
  3. Dim ARRCOPY As Variant
  4. Dim NEXTWEEKdate As Date
  5. Dim NEWFILEpath As Variant
  6.     ARRCOPY = Range("Y2").Resize(Range("Y2").End(xlDown).Row, Range("Y2").End(xlToRight).Column)
  7.     NEXTWEEKdate = Date + (14 - Weekday(Now))
  8.     NEWFILEpath = ThisWorkbook.Path & "\" & "Allsales" & CStr(Replace(NEXTWEEKdate, "/", "-")) & ".xls"
  9.     Set NEWBOOK = Workbooks.Add
  10.     With NEWBOOK
  11.         .Worksheets(1).Range("A1") = "Saterday"
  12.         .Worksheets(1).Range("A2").Resize(UBound(ARRCOPY), UBound(ARRCOPY, 2)) = ARRCOPY
  13.         .Title = "All Sales - " & NEXTWEEKdate
  14.         .Subject = "Sales"
  15.         .SaveAs Filename:=NEWFILEpath
  16.     End With
  17. End Sub
Attached Files
File Type: zip Simple stock taking spreadsheet_v1.zip (12.3 KB, 316 views)
Apr 10 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: scooterm | last post by:
### Question Can anyone name a text editor or XML editor (prefer open source) that can open a simple table XML file in a spreadsheet-type GUI, without adding any extra formatting or junk to the...
0
by: Mick Hardy | last post by:
Hi, Has anyone seen this weird behaviour or have any suggestions or can anyone reproduce it? The history: I converted a large third party DB from 97 to XP and it uses the...
3
by: Merlin | last post by:
Hi Group Anybody know where I could find a Example of a simple stock control system? Many Thanks Merlin
2
by: Derek Riley | last post by:
Hi, I need to setup a simple stock control database to include a record of receipts and despatches. Does anyone know of something already setup that I can adapt. Regards Derek.
1
by: Merlin | last post by:
Hi Group Anybody know where I could find a Example of a simple stock control system for Vb.Net using SQL or Access and ADO.Net? Many Thanks Merlin
3
by: fullyleaded | last post by:
hello all and a big pre-thanks for help. I am developing a simple message taking app that i would like anyone in the office to access. my intention is to put icons on their desktops which will...
1
by: platski | last post by:
I have learned a bit about vb recently and have been using it for my job, I still have questions and dont know how to do many things yet. I appreciate your time and efforts and hopefully I can...
18
by: Asle | last post by:
Hi, I am creating a Quote Database in MS Access 2007 that prepares Quote for a Printing Company. I have 2 tables, tblClient and tblQuote with 1-to-many relationships. in the Quote form, i...
3
by: Shal | last post by:
Hi all, I have a table with 300,000 records in it and I want to run an update that has a few clauses in the WHERE command and just changes one boolean value on a subset of records. What I am...
1
by: gulvaiz | last post by:
Dear Members, Hi I'm Shahzad form PAKISTAN. I want stock in FIFO system. let suppose i have two tables, pur, and sale, now i want results like that Date Transction Description ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.