LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 252
Default Passing a TextBox Object

Hi all,

txtCorActDue1 is one of TextBox on a form and FillDateIn is a procedure used
to fill date in the textbox when enter event happens, but when FillDateIn is
call like the following, there is alway a type mismatch error. I guess
txtCorActDue1 default value is text but how can I designate an object instead
of its default value passed?

Clara

Private Sub txtCorActDue1_Enter()
FillDateIn txtCorActDue1
End Sub


Private Sub FillDateIn(txBox As TextBox)
txBox.text = Year(FormatDateTime(14 + Now(), vbShortDate)) & "/" & _
Month(FormatDateTime(14 + Now(), vbShortDate)) & "/" & _
Day(FormatDateTime(14 + Now(), vbShortDate))
End Sub
 
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
Passing collections to an object Art Excel Programming 4 March 15th 07 06:27 AM
Passing a variant object to a C++ dll Martin[_29_] Excel Programming 1 November 24th 06 01:44 PM
passing an object mark Excel Programming 2 May 22nd 06 04:37 PM
Formatting Textbox, passing values to worksheet Craig[_21_] Excel Programming 2 November 7th 05 12:56 AM
Calling a Sub passing Textbox name Ducttape19 Excel Programming 2 April 7th 04 01:35 PM


All times are GMT +1. The time now is 03:20 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"