[python-win32] VB6 Listbox methods fail through ROT

dzzie dzzie at yahoo.com
Wed Oct 4 13:39:26 EDT 2023


 Wondering if anyone might have an insight on this.
If we add a vb6 listbox to the ROT, and try to access it using GetObjectwe can not access any of its methods with an error "Member not found"
 import win32com.client

form1 = win32com.client.GetObject('PyComTest.Form1')
form1.caption = "hi from vb!!"  # works
#form1.Move(0) #pywintypes.com_error: (-2147352573, 'Member not found.', None, None)

List1 = win32com.client.GetObject('PyComTest.List1')
#List1.AddItem('************************') #pywintypes.com_error: (-2147352573, 'Member not found.', None, None)
List1.Clear() #pywintypes.com_error: (-2147352573, 'Member not found.', None, None)
------------------------------------------------------
as a sanity check both do work from vb script
Set form1 = GetObject("PyComTest.Form1")
form1.caption = "test"
form1.Move(0)

Set List1 = GetObject("PyComTest.List1")
List1.AddItem "********* VBS SAYS HELLO ***************"
Currently using a vb6 standard exe manually adding objects to the ROT, and python 311 exe to run the scripts externally. 
I have not yet tried with a vb6 activex exe. 
Most things do work like textboxes, form methods etc. 
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/python-win32/attachments/20231004/8c3bfe6d/attachment.html>


More information about the python-win32 mailing list