Computer Learning Zone CLZ Access Excel Word Windows

If you can't make it good, at least make it look good.

-Bill Gates
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Visual Basic Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Date to Notepad VB6
Dwight Arroyo 
    
5 years ago
I know this is probably a boring question, however, I have scoured the Internet for answers and no one seems to have an answer to the following question listed below. Since I have just joined The Computer Learning Zone and Richard Rost knows what he is doing, talking about and is a complete expert at this, I am sure he can help...

My question is, how can I insert the date and time into notepad from VB6?

Thank you once again, for taking the time to read my question.

Dwight
Richard Rost  @Reply  
          
5 years ago
That's a tricky one. You could use the clipboard, copy the date from your app, shell open Notepad.exe, paste it there, but that might involve a WinAPI call.

Alternately, if all you need is just the date, you could just write out a text file as MyFile.TXT and then open that with Notepad. That would be easier to do.

I haven't had VB6 installed on my machines in YEARS, so I've got no way to try it for sure.
Alex Hedley  @Reply  
           
5 years ago
Open Notepad
Press F5
It inserts the current datetime
Alex Hedley  @Reply  
           
5 years ago
Another option is to add ".LOG" to the start of the file.
MS Article: How to Use Notepad to Create a Log File
Alex Hedley  @Reply  
           
5 years ago
[Untested]
Run a process:
echo %date% %time% > log.txt
Richard Rost  @Reply  
          
5 years ago
Yeah... what he said. :)
Dwight Arroyo OP  @Reply  
    
5 years ago
Thanks for your reply Richard, I will try my best. I am going to start with the Clipboard. Alex suggested the F5 method in Notepad which is great but I would like to do this programmatically. Might use AHK.
Dwight Arroyo OP  @Reply  
    
5 years ago
Much thanks to Alex for all the options as well!
Dwight Arroyo OP  @Reply  
    
5 years ago
Hello Richard:

I finally found an easy way to do this. Thanks to your course (VB 201), I was studying the "Print #1" method you used in reading and writing to files lesson. I inserted a timer onto the form, then added a non-visible text box, linked the date and time to the textbox and just used the"Print #1" method with the name of the textbox into notepad. Success! Thanks again Richard. I did want to ask you, what would be the best investment for me to purchase to upgrade my VB6 to something newer? To simplify, what new version of Visual Basic should I get? Thanks again for all your help!

Regards,
Dwight
Dwight Arroyo OP  @Reply  
    
5 years ago
Hello Richard:

Just an FYI, disregard my most recent post regarding my question as to what platform I should upgrade to. My better question is, what application/language/platform do I need to get to follow along with your lessons on Visual Basic 2019?

Most assuredly appreciated,
Dwight
Richard Rost  @Reply  
          
5 years ago
Just download Visual Studio. It's FREE. That's what I'll be making new lessons for.
Dwight Arroyo OP  @Reply  
    
5 years ago
Thanks Richard. Will do that!
Alex Hedley  @Reply  
           
5 years ago
Glad you got it working, sorry I thought you'd already tried the Print.

Is there anything in particular you want to see in the updated lessons?
I started writing up some Tips a few years back that might be of use.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Visual Basic Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/9/2026 1:12:17 AM. PLT: 1s