Unable to have VB print to specific cells

C

CoitusGod

i used VB to create a 'pop up' calendar to enter in dates. the way
have it written now is that it will place the text in the ActiveCell
i would like not to print to a certain cells but place the date in
text box that i created.
Private Sub Calendar1_Click()
ActiveCell.Value = Calendar1.Value
Unload Me
End Sub
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub UserForm_Initialize()
If IsDate(ActiveCell.Value) Then
Calendar1.Value = DateValue(ActiveCell.Value)
Else
Calendar1.Value = Date
End If
End Sub
i am a VB newbie so please treat me like one :
 
K

Kalle

YourFormName.YourTextBoxName.Text = YourCalendarName.Value

this line on closing the calendar would do it.
 
T

Tom Ogilvy

Private Sub Calendar1_Click()
Activesheet.Textbox1.Value = Format(Calendar1.Value,"mm/dd/yyyy")
Unload Me
End Sub

Depends on where your textbox is.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top