Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA- Calendar Control Click Event W Specific Select Case requirements

I am developing a VBA form for persons to load travel
trips into as a budget management tool. Here is problem.
The user clicks on a sp control to input a dollar amount
in a synchronized text box. He then clicks on the calendar
control and gets the Msgbox txt defined below. If he
clicks on yes I need the data to be loaded into specific
columns based on the date. If he settles his travel in Jan
then I want the settlement date and Per Diem maounts to be
loaded into the Jan columns only. The code works so far
for Jan only Calendar2.Values. I am looking for a way to
verify the date is within the a specified time period and
then I should be able to If the date validation process to
the correct column/row. I have tried a < syntax but the
second operator always drives a error MsgBox.

I am open to recoding processes but the intent is to
ensure that the settlement date calendar contol drops the
data into the correct Month column as persons input their
settled travel payments into the GUI.



Private Sub Calendar2_Click()

YesNoTab = MsgBox("Do you want to enter this date" & Chr
(13) _
& "as your settlement date?", vbYesNo + vbQuestion +
vbDefaultButton1, "MAJ S-TDY Settlement Date")

If YesNoTab = 6 Then
Me.lblSettleDate.Caption = Calendar2.Value


'Validate January 04 date to be dumped into
Jaunry's cell
If Calendar2.Value "12/31/2004" Then

Select Case TabStrip1.Value
Case 0
Range("N" & IndexPlus).Value = txtPerDiem.Value
Range("Q" & IndexPlus).Value =
lblSettleDate.Caption
End Select
End If



'Validate February 04 date to be dumped into
February's cell
If Calendar2.Value "01/31/2004" Then
Select Case TabStrip1.Value
Case 1
Range("S" & IndexPlus).Value = txtPerDiem.Value
Range("V" & IndexPlus).Value =
lblSettleDate.Caption
End Select
End If
Reply
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
Calculating future dates using WORKDAY & specific requirements seltzer Excel Worksheet Functions 7 October 23rd 08 03:26 PM
Loan Schedule - Specific Requirements Stuart[_3_] Excel Discussion (Misc queries) 1 July 29th 08 05:29 PM
Control plus click will not select multiple boxes Ken Cooke Excel Worksheet Functions 1 September 12th 06 11:32 PM
call a function on control click event tkraju via OfficeKB.com Excel Discussion (Misc queries) 7 August 25th 06 07:22 AM
How do you control scroll rate when click and drag to select cell rbperrie Excel Discussion (Misc queries) 1 June 25th 05 09:44 AM


All times are GMT +1. The time now is 01:23 PM.

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

About Us

"It's about Microsoft Excel"