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

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
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?
 
Upvote 0
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.
 
Upvote 0
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.
 
Upvote 0
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
 
Upvote 0
no, do u have msn? maybe if i hand u the sheet then u will get a better understanding
 
Upvote 0
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.
 
Upvote 0
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>
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,803
Members
449,048
Latest member
greyangel23

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