#1   Report Post  
Posted to microsoft.public.excel.programming
Ant Ant is offline
external usenet poster
 
Posts: 53
Default User Form?

I want to run a quick macro to tell me the number of days between 2 dates. I
was wondering if a user form my be the best way. I would like to assign a
button to a macro which then displays a User Form box where I can enter 2
dates into 2 text boxes or perhaps select from a data validation. A 3rd text
box will tell me the number of days in between the 1st 2 dates. Does this
sound like I'm going in the right direction? If so, does someone know how I
can do this. Thanks in advance, Ant.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,726
Default User Form?

How about simply using cells for the dates, and then in a third use

=B1-A1

or whatever you choose.

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Ant" wrote in message
...
I want to run a quick macro to tell me the number of days between 2 dates.

I
was wondering if a user form my be the best way. I would like to assign a
button to a macro which then displays a User Form box where I can enter 2
dates into 2 text boxes or perhaps select from a data validation. A 3rd

text
box will tell me the number of days in between the 1st 2 dates. Does this
sound like I'm going in the right direction? If so, does someone know how

I
can do this. Thanks in advance, Ant.



  #3   Report Post  
Posted to microsoft.public.excel.programming
Ant Ant is offline
external usenet poster
 
Posts: 53
Default User Form?

I really want to do the calc in a seperate pop-up box on the screen. The
nature of what I am doing means that I am continuously needing to do the date
calc and a pop-up box would be a neat and tidy way of doing it rather than
finding space on the spready somewhere.

"Bob Phillips" wrote:

How about simply using cells for the dates, and then in a third use

=B1-A1

or whatever you choose.

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Ant" wrote in message
...
I want to run a quick macro to tell me the number of days between 2 dates.

I
was wondering if a user form my be the best way. I would like to assign a
button to a macro which then displays a User Form box where I can enter 2
dates into 2 text boxes or perhaps select from a data validation. A 3rd

text
box will tell me the number of days in between the 1st 2 dates. Does this
sound like I'm going in the right direction? If so, does someone know how

I
can do this. Thanks in advance, Ant.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,726
Default User Form?

Problem with that is that there is no data types on a form so you have to
manage it all yourself, not trivial. You could format a worksheet to have
two cells that look like a textbox, but format them as date, and a third to
who the difference. You could hid that sheet and have a button on your main
sheet that unhides it, activates it, and solicits input. Another button on
that secondary sheet could re-hide it take you back to the main sheet and
process the info. I just think a form is more effort than necessary here.

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Ant" wrote in message
...
I really want to do the calc in a seperate pop-up box on the screen. The
nature of what I am doing means that I am continuously needing to do the

date
calc and a pop-up box would be a neat and tidy way of doing it rather than
finding space on the spready somewhere.

"Bob Phillips" wrote:

How about simply using cells for the dates, and then in a third use

=B1-A1

or whatever you choose.

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Ant" wrote in message
...
I want to run a quick macro to tell me the number of days between 2

dates.
I
was wondering if a user form my be the best way. I would like to

assign a
button to a macro which then displays a User Form box where I can

enter 2
dates into 2 text boxes or perhaps select from a data validation. A

3rd
text
box will tell me the number of days in between the 1st 2 dates. Does

this
sound like I'm going in the right direction? If so, does someone know

how
I
can do this. Thanks in advance, Ant.






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
How do I fill a cell in a user form from a selection on same form? Terry Tipsy Excel Discussion (Misc queries) 4 June 11th 07 02:59 PM
User form Mike Rogers Excel Discussion (Misc queries) 2 March 10th 06 05:56 PM
How to: User Form to assign a user defined range to a macro variab TrevTrav Excel Programming 1 March 22nd 05 07:57 PM
I am looking to see if anybody has an equivalant user form to Outlooks CONTACT form BruceJ[_2_] Excel Programming 2 October 15th 03 05:28 PM


All times are GMT +1. The time now is 10:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"