Solved

Need a code for VBA to populate date combo boxes

Posted on 2010-11-15
10
607 Views
Last Modified: 2013-11-18
Hi,
I am working in VBA custom programming inside of another software (NOT MS Office). I need to create a date field and am not wanting to use the calendar control since there is a limitation to admin work involved with installing and registering ocx files. Either I need something by which I can create the calendar myself or I create the combo box which will load the values for date/month and year. Are there any other suggestions

Regards,
Ganesh
0
Comment
Question by:iganu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
10 Comments
 
LVL 24

Expert Comment

by:fridom
ID: 34142646
there are really many options for that you could e.g use the Calendar active x.
http://www.shareup.com/Calendar_ActiveX_Control-download-26426.html

You can bind a datasource to a combo box if you are in Access.

You can simply implement you own calendar class.

Or you just can look around for other calendar controls see. e.g:

http://www.lebans.com/monthcalendar.htm

Regards
Friedrich
0
 
LVL 2

Expert Comment

by:dataflowjoe
ID: 34143883
The Steve Lebans example as reference by Friedrich is great I use it in virtually all the systems I build. There are no ocx registrations to worry about, it uses the windows API and it's simple to control.
Steve Lebans gives many examples of usage. http://www.lebans.com/monthcalendar.htm
0
 

Author Comment

by:iganu
ID: 34144244
Hi, While the examples provided are good, these are access forms. As I mentioned I am working in a product which allows for basic customization in VBA, so require something in pure VBA userforms.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 24

Expert Comment

by:fridom
ID: 34146922
well VBA is bound to some Windows Office package. So what office Package are you using?
VBA is not a standalone product. So please be more specific about what you are really looking for.

Regards
Friedrich
0
 

Author Comment

by:iganu
ID: 34152300
I am working on a product - iGrafx (www.iGrax.com). This product can be customized to add some new forms etc, so I am working within that domain. I have attached the screen shot of the extensions available
iGrafx.JPG
0
 

Accepted Solution

by:
iganu earned 0 total points
ID: 34152372
Never Mind.. I found what I want here:
http://www.vbaexpress.com/kb/getarticle.php?kb_id=791 
0
 
LVL 24

Expert Comment

by:fridom
ID: 34152676
I disagree, the example uses Excel, so my answer was on the point. If you like the posted code well, so be it, but the given answer was technically correct.
0
 

Author Comment

by:iganu
ID: 34152845
I never mentioned that your answer is wrong. The difference is that your code uses Access Forms, while the excel example uses vanilla VBA forms which was my requirement in first place. Hope it clarifies. I am not able to copy an Access form into my application user form to replicate..
0
 
LVL 24

Expert Comment

by:fridom
ID: 34157014
Well it uses VBA for Excel and that is what I wrote. There does not exist a VBA form itself it's always part of one office-package. And the code would work in Access the same way. However this VBA code is one of the really bad pieces of code around.....
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Java array 10 85
Crashing when deleting value with no child in Binary Tree 4 61
Starting to use Git with Visual  Studio Online 1 65
COM server issue 2 16
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question