LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Adding Date to another Cell

Hi;
I have an excel spreadsheet that if you click Anywhere in Column A it
will bring up a Calendar wheree you need to enter a date. I need the
Current date inputed in Column A and the New Date that you selected in
the calendar to be in Column B. Can someone please help me!

Below is my code.


Dim dDate As Date
Dim LRange As String

Private Sub Calendar1_Click()
ActiveCell = Calendar1.Value
End Sub

Private Sub CommandButton2_Click()
UpdateCell
End Sub


Private Sub UserForm_Activate()
Me.Calendar1.Value = Date
End Sub


Private Sub CommandButton1_Click()
Calendar1 = Date
SpinButton1 = 0

End Sub

Private Sub SpinButton1_Change()
If SpinButton1 = -1 And SpinButton1 <= 1 Then dDate = Calendar1

TextBox1 = SpinButton1
Calendar1 = DateAdd("m", TextBox1.Value, dDate)
UpdateCell
End Sub



Private Sub UpdateCell()
ActiveCell = Calendar1
ActiveCell.NumberFormat = "mm/dd/yyyy"

End Sub

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding A Date To Adjacent Cell FS Excel Worksheet Functions 2 March 29th 10 10:52 PM
adding days from one cell with a date in it to another cell cufc1210 Excel Discussion (Misc queries) 4 August 20th 09 12:40 PM
Adding days to a date cell to get a new date Pete Derkowski Excel Worksheet Functions 6 May 1st 08 03:53 PM
Adding a fixed date to a cell Erik Jahre Excel Worksheet Functions 2 June 20th 05 10:00 PM
Adding a date to a cell CBG Excel Programming 3 September 21st 03 03:32 PM


All times are GMT +1. The time now is 12:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"