Solved

Change dates in URL using Calendar control on Exccel 2010

Posted on 2013-05-28
9
309 Views
Last Modified: 2013-06-02
I'm not sure if this is possible but is there a way to change the date parameters in a URL string using a calendar control?

Here is an example of a URL:

http://www.abc.com?date_from=2013-05-01&date_to=2013-05-03

Can I use a calendar control in Excel to change the date_from and date_to parameters?
0
Comment
Question by:futr_vision
  • 5
  • 4
9 Comments
 
LVL 20

Expert Comment

by:ltlbearand3
ID: 39203324
Typically what I would do is to have two controls on a form.  A From Date control and a To Date Control.  Then you can use something like:
Format(MonthView1.Value, "yyyy-mm-dd")
to get the date in the format you need.  Then at that point you can build your url.

-Bear
0
 

Author Comment

by:futr_vision
ID: 39204175
Thanks but how would you do that?
0
 
LVL 20

Expert Comment

by:ltlbearand3
ID: 39204425
See if this attached workbook helps you out.
formsample.xlsm
0
 

Author Comment

by:futr_vision
ID: 39205407
Says "Could not load some objects because they are not available on this machine"
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 20

Expert Comment

by:ltlbearand3
ID: 39205556
What version of Excel are you using?  They changed the calendar options depending on version.  

What level of experience do you have with Excel VBA?  This will help me in walking you through the next steps.
0
 

Author Comment

by:futr_vision
ID: 39205697
I am using Excel 2010 and my VBA experience is minimal as you can probably tell from the other question you are helping me with. :)
0
 

Author Comment

by:futr_vision
ID: 39205722
I may even bypass the calendar control completely and create a way to alter a series of date ranges from a single cell. For example I may want 15 day intervals. I would enter 15 into a cell and all my dates would adjust to be continuous 15 day intervals if that makes any sense.

So it would be something like this.

1. Enter start date
2. Enter interval
3. End date would be calculated based on interval and start date and entered in cell
4. Next row(column 1-start date) would be the next chronological date counting backwards
5. End date - rinse, repeat.

But this is another question and not really that hard.
0
 
LVL 20

Accepted Solution

by:
ltlbearand3 earned 500 total points
ID: 39206564
They took out the calendar control in Excel 2010.  Therefore it may be best to move to your other idea.  If you are running the 32 bit version, you can try and copy mscal.ocx or mscomct2.ocx from a machine running an older version.

If this sheet is only used by you, then the idea of just using some cells works just as easily.  See this example:
SetUrlSample.xlsm
0
 

Author Closing Comment

by:futr_vision
ID: 39214768
I chose a simpler method of replacing the dates in a URL with help from another expert. Thanks!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

867 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now