Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default ActiveX textBox : value doesn't show after programatically changing the value

Hi,

I've a quite strange problem.
A VBScript in an Outlook form, opens an Excel WorkBook containing on a
sheet, several Active X Controls.
The script adds the name of the contact in the ActiveX TextBox Control : the
fields value and text are actually modified as a result.
But, the displayed control doesn't show the value !

Does any one has any idea how to solve this issue ?

Thanks for reading,
Philippe

----------------------------
Sub exportVersExcel_Click()

Set objExcelApp = Application.CreateObject("Excel.Application")
Set objExcelBook = objExcelApp.Workbooks.Open _
("\\Server03\annuaire\Demande_Ouverture_Compte.xls ")
Set objExcelSheet = objExcelBook.Sheets("DemandeOuverture")
objExcelSheet.Activate


Set objTextBox_NomBenef = objExcelSheet.OLEObjects("TextBox_NomBenef")
objTextBox_NomBenef.Object.value = Item.LastName

objExcelApp.Application.Visible = True

End Sub
-------------------------------


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default ActiveX textBox : value doesn't show after programatically changing the value

Update :

If the control is .Activate before changing its value, then the value will
be displayed.
Which means that one have to add one line for each control, and activate
every single control in turn
It seems a bit crazy to have to do this, but it's what I'm gonna do for it
works.
If anyone has a better idea, it would still be interesting.

Thanks,
Philippe

"Philippe" a écrit dans le message de news:
...
Hi,

I've a quite strange problem.
A VBScript in an Outlook form, opens an Excel WorkBook containing on a
sheet, several Active X Controls.
The script adds the name of the contact in the ActiveX TextBox Control :
the fields value and text are actually modified as a result.
But, the displayed control doesn't show the value !

Does any one has any idea how to solve this issue ?

Thanks for reading,
Philippe

----------------------------
Sub exportVersExcel_Click()

Set objExcelApp = Application.CreateObject("Excel.Application")
Set objExcelBook = objExcelApp.Workbooks.Open _
("\\Server03\annuaire\Demande_Ouverture_Compte.xls ")
Set objExcelSheet = objExcelBook.Sheets("DemandeOuverture")
objExcelSheet.Activate


Set objTextBox_NomBenef = objExcelSheet.OLEObjects("TextBox_NomBenef")
objTextBox_NomBenef.Object.value = Item.LastName

objExcelApp.Application.Visible = True

End Sub
-------------------------------




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
Excel ActiveX TextBox Question dhstein Excel Discussion (Misc queries) 4 January 29th 09 02:12 PM
Programatically control a shapes TextBox Francis Brown[_2_] Excel Programming 2 September 26th 05 06:19 PM
ActiveX Textbox question Stuart[_5_] Excel Programming 3 July 11th 04 07:02 PM
Further ActiveX Control (TextBox) questions Stuart[_5_] Excel Programming 0 July 4th 04 05:19 PM
ActiveX Control (TextBox) question Stuart[_5_] Excel Programming 2 July 4th 04 12:37 PM


All times are GMT +1. The time now is 08:39 AM.

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

About Us

"It's about Microsoft Excel"