Dates

zaahir

Board Regular
Joined
Oct 11, 2006
Messages
55
I need to reference the system date, and have it pasted into a cell on pressing a commandbutton, then select the ffg cell & restarting the process and have that data in that cell saved.
Please help!!

regards
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
49,437
Office Version
  1. 365
Platform
  1. Windows
zaahir

Welcome to the Mr Excel board!
I need to reference the system date, and have it pasted into a cell on pressing a commandbutton
Which cell? Perhaps the ActiveCell? .. or a particular cell referece like C2?

then select the ffg cell & restarting the process and have that data in that cell saved.
Any chance of explaining this in more detail?
 

zaahir

Board Regular
Joined
Oct 11, 2006
Messages
55
Referecing system dates

hi
i have a cmdbutton for which i require code to select a specific cell eg E8 and enter the date. on completeion of that i need the code to select the following cell E9 and on executing the code have the date entered into E9 then E10 etc.
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
49,437
Office Version
  1. 365
Platform
  1. Windows
Re: Referecing system dates

hi
i have a cmdbutton for which i require code to select a specific cell eg E8 and enter the date. on completeion of that i need the code to select the following cell E9 and on executing the code have the date entered into E9 then E10 etc.
To me this seems to be saying:
"Put the current date in E8 and E9 and E10, .... "
This doesn't make any sense to me so I presume I still have not understood the requirements.
 

ktab

Well-known Member
Joined
Apr 21, 2005
Messages
1,297

ADVERTISEMENT

let's say that e8 needed to e30

for i=8 to 30
cells(i,5)=date
next i

(cells(i,5) the "5" declares the column; a=1, b=2, e.c.t.)
If you know where code to stop (let's say where column1 (a:a)
has last cell with value then code becomes:

lastrow=range("a65536").end(xlup).row
for i=8 to lastrow
cells(i,5)=date
next i
 

zaahir

Board Regular
Joined
Oct 11, 2006
Messages
55
no, do u have msn? maybe if i hand u the sheet then u will get a better understanding
 

zaahir

Board Regular
Joined
Oct 11, 2006
Messages
55
in the company we have stock coming in. i need the button to allocate the date when the stock is booked in. all of the stock are kept on 1 sheet. eg. if today i get gold cell E8 must read Oct 12, tomorow i get a diamond then E9 must read Oct 13. the Button needs to select the following cell and enter the next transaction date into it.
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
49,437
Office Version
  1. 365
Platform
  1. Windows
OK, assuming you have a heading or something already in E7, try this:

<font face=Courier New><SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> CommandButton1_Click()
    Range("E65536").End(xlUp).Offset(1, 0).Value = <SPAN style="color:#00007F">Date</SPAN>
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>
 

Forum statistics

Threads
1,136,502
Messages
5,676,225
Members
419,614
Latest member
bfletcher

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
Top