Jump to content

VBA (Excel Date and Time)

Go to solution Solved by Venomz1337,
Sub insertDate()	Selection.Value = DateEnd Sub

Selection can be any cell you want. Then I would just map the Sub to a macro key.

 

 

I've managed to sort it out.

Thanks for the help tho!

Hi,

I basically want to be able to select a cell, press a key and it will automatically put a static current date and time in there.

I've tried using application onkey but seem to be getting nowhere. Could anyone assist me in this?

Cheers

My Gaming Rig;  Motherboard - ASUS Maximus VI Hero | CPU - Intel i5 4670k @4.5Ghz 1.25v | GPU - GIGABYTE GTX 980 @Stock | RAM -  16GB Corsair Vengeance @1866Mhz | CPU Cooler - Corsair H100i | Storage #1 - Samsung 840 Basic 250GB SSD | Storage #2 - Sandisk II 480GB SSD | Storage #3 - 2TB 7200rpm 64mb HDDPSU - Corsair HX750 | Case - Fractal Design R4 |

Link to comment
https://linustechtips.com/topic/505306-vba-excel-date-and-time/
Share on other sites

Link to post
Share on other sites

Sub insertDate()	Selection.Value = DateEnd Sub

Selection can be any cell you want. Then I would just map the Sub to a macro key.

 

 

I've managed to sort it out.

Thanks for the help tho!

My Gaming Rig;  Motherboard - ASUS Maximus VI Hero | CPU - Intel i5 4670k @4.5Ghz 1.25v | GPU - GIGABYTE GTX 980 @Stock | RAM -  16GB Corsair Vengeance @1866Mhz | CPU Cooler - Corsair H100i | Storage #1 - Samsung 840 Basic 250GB SSD | Storage #2 - Sandisk II 480GB SSD | Storage #3 - 2TB 7200rpm 64mb HDDPSU - Corsair HX750 | Case - Fractal Design R4 |

Link to comment
https://linustechtips.com/topic/505306-vba-excel-date-and-time/#findComment-6744943
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×