Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Return value from calendar to a label...

Hi all,

I'm trying to use the calendar control to change the caption on
label.

I have one form containing the label.
I have another form with the calendar control on, and I want excel t
return the value from the form with the calendar control object to th
form with the label.

Why doesn't this work???

Private Sub Calendar1_Click()
stDeadline = Calendar1.Value
frmcalendar.Hide

With frmNytProjekt
Label10.Caption = stDeadline
End With

End Sub

Cheers

Steff_D

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Return value from calendar to a label...

Haven't tried it, but it looks okayish.

What do you get? Does the project form pop-up with Label10 in it, or
something else?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Steff_DK " wrote in message
...
Hi all,

I'm trying to use the calendar control to change the caption on a
label.

I have one form containing the label.
I have another form with the calendar control on, and I want excel to
return the value from the form with the calendar control object to the
form with the label.

Why doesn't this work???

Private Sub Calendar1_Click()
stDeadline = Calendar1.Value
frmcalendar.Hide

With frmNytProjekt
Label10.Caption = stDeadline
End With

End Sub

Cheers

Steff_DK


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Return value from calendar to a label...

I get error '424' and 'Object required'.

It seems that excel won't return to the form with label10 after i
closes the form with the calendar?!

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Return value from calendar to a label...

Steff,

This works for me. I put .Show in so that I could see it worked

Private Sub Calendar1_Click()
Dim stDeadline

stDeadline = Calendar1.Value
frmCalendar.Hide

With frmNytProjekt
.Label10.Caption = stDeadline
.Show
End With

End Sub

Note the dot before Label10

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Steff_DK " wrote in message
...
I get error '424' and 'Object required'.

It seems that excel won't return to the form with label10 after it
closes the form with the calendar?!?


---
Message posted from http://www.ExcelForum.com/



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Return value from calendar to a label...

It works now!!!

Thanks a million - been sitting here for hours wondering why it didn'
work... (Forgot the dot!!! doooh...)

Stef

--
Message posted from http://www.ExcelForum.com



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Return value from calendar to a label...

Good. Oddly I didn't get the same error as you.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Steff_DK " wrote in message
...
It works now!!!

Thanks a million - been sitting here for hours wondering why it didn't
work... (Forgot the dot!!! doooh...)

Steff


---
Message posted from http://www.ExcelForum.com/



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
Return SEARCHED Column Number of Numeric Label and Value Sam via OfficeKB.com Excel Worksheet Functions 23 January 30th 06 06:16 PM
how to lookup a value within a range and return a label jocmccoy Excel Discussion (Misc queries) 1 November 16th 05 11:52 AM
Return Numerical Label for LAST value Subtracted to reach Sum Target Value Sam via OfficeKB.com Excel Worksheet Functions 17 October 31st 05 01:46 PM
label to return a value spydor Excel Discussion (Misc queries) 1 October 30th 05 07:24 PM
AVERAGE Row of Numbers and Return Corresponding Numeric Label Sam via OfficeKB.com Excel Worksheet Functions 14 September 20th 05 01:07 AM


All times are GMT +1. The time now is 07:50 AM.

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"