Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / September 2007

Tip: Looking for answers? Try searching our database.

case select

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
john philippen - 28 Sep 2007 14:04 GMT
since 2007 the code doesn't work

Sub vakantie_check()
Dim datum As Date
datum = Range("datum_vandaag")
   Select Case datum
       ' de afdruk wordt gemaakt tijdens een vakantie
       Case Range("herfst_begin") To Range("herfst_eind")
            Range("datum_vandaag") = Range("herfst_eind") + 3
           
       Case Range("kerst_begin") To Range("kerst_eind")
            Range("datum_vandaag") = Range("kerst_eind") + 3
           
       Case Range("voorjaars_begin") To Range("voorjaars_eind")
            Range("datum_vandaag") = Range("voorjaars_eind") + 3
           
       Case Range("mei_begin") To Range("mei_eind")
            Range("datum_vandaag") = Range("mei_eind") + 3
   End Select
End Sub

whats wrong?
Signature

Vragen is nooit dom.
Met een vraag blijven lopen wel.
Want dat lost nooit iets op.

Ron de Bruin - 28 Sep 2007 15:42 GMT
Hoi John

Use something like this

Sub vakantie_check()
Dim datum As Long
datum = CLng(Range("datum_vandaag"))
   Select Case datum
       ' de afdruk wordt gemaakt tijdens een vakantie
       Case CLng(Range("herfst_begin").Value) To CLng(Range("herfst_eind").Value)
            Range("datum_vandaag") = Range("herfst_eind") + 3
           
   End Select
End Sub

Signature

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm

> since 2007 the code doesn't work
>
[quoted text clipped - 18 lines]
>
> whats wrong?
john philippen - 28 Sep 2007 20:41 GMT
I will try this on monday
thnx

> Hoi John
>
[quoted text clipped - 33 lines]
> >
> > whats wrong?

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.