Wrox Programmer Forums
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 22nd, 2004, 09:13 AM
Registered User
 
Join Date: Dec 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default DATE within txt box

I would like to know how to automatically update a .txt box without having to do the code manually every month such as .txt_month_value = "MARCH".

Could someone let me know

Thanks

Alan

 
Old December 22nd, 2004, 12:36 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 150
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try this:

Private Sub Workbook_Open()
  Dim i
  i = Month(Now)
  Application.Sheets("Sheet1").TextBox1.Text = Format(Month(i), "mmmm")
End Sub





Similar Threads
Thread Thread Starter Forum Replies Last Post
Importing date field in a large txt file CongoGrey Access 2 July 10th, 2007 06:44 AM
Date Conversion from txt field darrenb Access VBA 2 April 6th, 2007 07:04 AM
preserving txt box format when INSERTing pete_m ASP.NET 1.0 and 1.1 Basics 1 December 2nd, 2004 11:49 AM
Haw to convert txt date to 8/11/2004 Deputy Dog C# 1 September 1st, 2004 07:54 PM
Getting a search txt box to work JJ Access VBA 4 October 23rd, 2003 10:19 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.