ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   User Form? (https://www.excelbanter.com/excel-programming/378370-user-form.html)

Ant

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.

Bob Phillips

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.




Ant

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.





Bob Phillips

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.








All times are GMT +1. The time now is 02:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com