A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Formatting entries in userform textbox



 
 
Thread Tools Display Modes
  #1  
Old June 25th, 2004, 03:53 PM
RobG
external usenet poster
 
Posts: n/a
Default Formatting entries in userform textbox

I'm using a userform for enter dates and times into a
worksheet. is there a way of formatting the data as it's
input like in an Access form? or is there a way to use an
Access form to enter the data into Excel?

thanks.
  #2  
Old June 26th, 2004, 01:05 AM
Dave Peterson
external usenet poster
 
Posts: n/a
Default Formatting entries in userform textbox

I don't use access, but you could validate it when the user is leaving the
textbox:

Option Explicit
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If IsDate(Me.TextBox1.Value) Then
Me.TextBox1.Value = Format(CDate(Me.TextBox1.Value), "mm/dd/yyyy")
Else
Cancel = True
End If
End Sub

Or maybe you can present the user with a calendar.

http://www.rondebruin.nl/calendar.htm
(From Ron de Bruin's site.)


RobG wrote:

I'm using a userform for enter dates and times into a
worksheet. is there a way of formatting the data as it's
input like in an Access form? or is there a way to use an
Access form to enter the data into Excel?

thanks.


--

Dave Peterson

  #3  
Old June 27th, 2004, 01:01 PM
AlfD
external usenet poster
 
Posts: n/a
Default Formatting entries in userform textbox

Hi!

I don't know how complex your requirements are, but if they are fairly
simple, the built-in Data Form... input facility will do what you
appear to need on dates and times.

Enter a date as 12/5/03 and format the column it goes to as you wish.
12/5 would transcribe as current year.

Similarly for time, but use 11:55 etc.

Alf


---
Message posted from http://www.ExcelForum.com/

  #4  
Old June 28th, 2004, 03:01 PM
Jamie Collins
external usenet poster
 
Posts: n/a
Default Formatting entries in userform textbox

"RobG" wrote ...
I'm using a userform for enter dates and times into a
worksheet. is there a way of formatting the data as it's
input


Use the Microsoft Masked Edit Control (MSMASK32.OCX)

Jamie.

--
  #5  
Old June 29th, 2004, 12:01 AM
Dave Peterson
external usenet poster
 
Posts: n/a
Default Formatting entries in userform textbox

This was on my pc (win98), but don't you need to worry about licensing and
distribution rights if you use this?

Jamie Collins wrote:

"RobG" wrote ...
I'm using a userform for enter dates and times into a
worksheet. is there a way of formatting the data as it's
input


Use the Microsoft Masked Edit Control (MSMASK32.OCX)

Jamie.

--


--

Dave Peterson

  #6  
Old June 29th, 2004, 09:21 AM
Jamie Collins
external usenet poster
 
Posts: n/a
Default Formatting entries in userform textbox

Dave Peterson wrote ...

This was on my pc (win98), but don't you need to worry about licensing and
distribution rights if you use this?


Dave,
Worry, with my MSDN subscription? :-)

Seriously, it's a good and valid point, of course. I guess it depends
on the circumstances. If the app in question is for the OP's personal
use on their machine, then there's no issue. If they are developing
for other personnel within their organization, the chances are they
will have the correct licensing in place e.g. each user machine may
have the same build. If they developing the app for a client, a great
way to obtain a license to distribute is to charge it to the first
client that needs it g. If they are developing a third party app
then chances they should have a 'developer' edition or a software
development package such as Visual Studio anyhow.

It would be useful to know which controls ship with each version of
Excel, Office and Windows. With such a reference one could say, if
someone has version x then they will have component y already on their
machine and distribution is no issue. Anyone know of such a resource?

Jamie.

--
  #7  
Old June 30th, 2004, 12:18 AM
Dave Peterson
external usenet poster
 
Posts: n/a
Default Formatting entries in userform textbox

I searched (cursory, though) the KB looking for "activex excel included" and
found this article for Access:

http://support.microsoft.com/default...b;en-us;825796

And for xl97:
http://support.microsoft.com/default...b;EN-US;169813
which had a link to:
http://support.microsoft.com/default...b;EN-US;163535


My bet is that there are lots of restrictions that I couldn't find. (But it
really isn't much fun looking! vbg)



Jamie Collins wrote:

Dave Peterson wrote ...

This was on my pc (win98), but don't you need to worry about licensing and
distribution rights if you use this?


Dave,
Worry, with my MSDN subscription? :-)

Seriously, it's a good and valid point, of course. I guess it depends
on the circumstances. If the app in question is for the OP's personal
use on their machine, then there's no issue. If they are developing
for other personnel within their organization, the chances are they
will have the correct licensing in place e.g. each user machine may
have the same build. If they developing the app for a client, a great
way to obtain a license to distribute is to charge it to the first
client that needs it g. If they are developing a third party app
then chances they should have a 'developer' edition or a software
development package such as Visual Studio anyhow.

It would be useful to know which controls ship with each version of
Excel, Office and Windows. With such a reference one could say, if
someone has version x then they will have component y already on their
machine and distribution is no issue. Anyone know of such a resource?

Jamie.

--


--

Dave Peterson

  #8  
Old June 30th, 2004, 10:49 AM
Jamie Collins
external usenet poster
 
Posts: n/a
Default Formatting entries in userform textbox

Dave Peterson wrote ...

I searched (cursory, though) the KB looking for "activex excel included" and
found this article for Access:

http://support.microsoft.com/default...b;en-us;825796

And for xl97:
http://support.microsoft.com/default...b;EN-US;169813
which had a link to:
http://support.microsoft.com/default...b;EN-US;163535


My bet is that there are lots of restrictions that I couldn't find. (But it
really isn't much fun looking! vbg)


Dave, Thanks for that. Yeah, I've looked before but without much luck.

Jamie.

--
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
textbox formatting problem jeffrey c Powerpoint 4 August 21st, 2004 10:09 AM
Formatting Linked Excel Tables Tammie Tables 7 June 10th, 2004 10:25 AM
userform and textbox Martijn Worksheet Functions 0 May 7th, 2004 12:40 PM
Changing a group of entries Peter New Users 2 April 24th, 2004 03:25 AM


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


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.