1. Late-bound ActiveX Control - Error 438 when calling method
I have been round and round and look at tons of posts on the net and
can not find a real answer.
Basic Info:
I have an application in which I need to create an instance of an
activex control at runtime, put it on a form, and call its methods and
properties.
Problem:
When I put the control on the form at design time, everything works.
The problem comes in when I do a control.add.
--- Code Snipet ---
Set tAddin = Me.Controls.Add("MyOCX.ControlName", "ctrlReport", Me)
tAddin.Left = 0
tAddin.Top = 0
tAddin.Visible = True
tAddin.doPrint False
--- End Snipet ---
The control is created successfully and displays correctly. On the
line
tAddin.doPrint False
which is a method in the control, i get Error # 438 Object does not
support this property or method.
I have tried creating an ocx with a single sub called TestThis with no
parameteres and I still get this error.
PLEASE PLEASE PLEASE HELP
I am very stuck and realy need to get this working.
Thanks in advance for any help you can give.
Adam
2. Bulk Creation of Printers on Windows 2003 Server using VB Scri - Scripting for Windows Server
3. Bulk Creation of Printers on Windows 2003 Server using VB Script
Well I had the same challenge that some others had here. Basically I had over
2000 Novell NDPS Print Agents I needed to bring into Windows 2003. I used the
over the counter script from the Microsoft Scripting Center, but it would die
at the objPrinter.Put_ statement. That is because you need to create the
TCP/IP Printer port first.
Well here's what I came up with that works with a twist; it reads all the
info from an Excel spreadsheet. Key point is the DriverName needs to be what
Microsoft lists when you run through the wizard (I.e. "HP LaserJet Series
4000 PS")
Excel needs to have a Sheet called "Add" with each column named in order as
follows (It has to be this way to work with the offset) :
PortName PortAddress DriverName PortName DeviceID Network Shared ShareName
Here is the VB Script:
Option Explicit
On error resume next
Dim oXL
Dim TextXL
Dim CRLF
Dim oArgs
Dim oObject
Dim objPrinter
Dim objWMIService
Dim strComputer
Dim objExcel
Dim objNewPort
'Get the command line args
set oArgs=wscript.arguments
CRLF = Chr(13) & Chr(10)
'If no command line arguments provided, prompt for file containing users to
add/delete
If oArgs.Count = 0 Then
TextXL = InputBox("This scripts reads an Excel spreadsheet and adds
printers to the specified Windows Server." & CRLF & CRLF & _
"Type in the path of a file containing printers to add" & CRLF & CRLF
& _
"Sample Add User file: C:\ADDPRTRS.XLS" & CRLF) ' & CRLF & _
'Else file containing users is the first argument
Else
TextXL = oArgs.item(0)
End If
If TextXL = "" Then
WScript.Echo "No input file provided. Stopping the script now."
WScript.Quit(1)
End If
'Start EXCEL
Set oXL = WScript.CreateObject("EXCEL.application")
'True Displays Excel False Hides Excel
'oXL.Visible = True
'Open the workbook passed in the command line
oXL.workbooks.open TextXL
'Activate the Add page of Excel Spreadsheet
oXL.sheets("Add").Activate
'Specifies Local Server to run script against
strComputer = "."
'Put the cursor in the starting cell
oXL.ActiveSheet.range("A2").Activate
'Until we run out of rows
Do While oXL.activecell.Value <> ""
'Creates TCPIP Printer Port
Set objWMIService = GetObject("winmgmts:")
Set objNewPort = objWMIService.Get _
("Win32_TCPIPPrinterPort").SpawnInstance_
objNewPort.Name = oXL.activecell.offset(0, 0).Value ' "IP_169.254.110.160"
objNewPort.Protocol = 1
objNewPort.HostAddress = oXL.activecell.offset(0, 1).Value '
"169.254.110.160"
objNewPort.PortNumber = "9100"
objNewPort.SNMPEnabled = False
objNewPort.Put_
'Creates Printer with Associated TCPIP Printer Port
Set objWMIService = GetObject("winmgmts:")
Set objPrinter = objWMIService.Get _
("Win32_Printer").SpawnInstance_
objPrinter.DriverName = oXL.activecell.offset(0, 2).Value ' "HP LaserJet
4000 Series PS"
objPrinter.PortName = oXL.activecell.offset(0, 3).Value '
"IP_169.254.110.160"
objPrinter.DeviceID = oXL.activecell.offset(0, 4).Value '
"ScriptedPrinter"
objPrinter.Network = oXL.activecell.offset(0, 5).Value ' "TRUE"
objPrinter.Shared = oXL.activecell.offset(0, 6).Value ' "TRUE"
objPrinter.ShareName = oXL.activecell.offset(0, 7).Value '
"ScriptedPrinter"
objPrinter.Put_
'Step to the next printer...
oXL.activecell.offset(1, 0).Activate 'Next row
Loop
'Done. close excel spreadsheet
oXL.application.quit
' Hope this helps someone else : )
5. VB6 Activex DLL 32bits on 64bits Windows 2003 Server
Hi, I have few VB6 Activex DLLs 32bits that must run on 64bits Windows 2003 Server. I am using these DLLs in my ASP pages. The DLLs are registered, but when I call server.createobject I get Microsoft VBScript runtime error '800a01ad' ActiveX component can't create object The IWAM_... and IUSR_... users are set up correctly, which solved the problem on 32bits OS, but it does not help now. I have researched and found that many people have the same problem, but I have not found the solution. It is obvious that the issue is 32bits vs 64bits, but what do I have to do to solve the problem. TIA, regards, George.
6. Late binding PowerPoint 2003 and 2007 - VB.Net
7. late binding when vb.net 2005 updates excel 2003
Douglas, Why do early binding and late binding not mix well? I've never heard of that. But beside a piece of code this is probably all we can tell you. (In Excel something like 00123 is as well a "text". The name in all Net languages is "string" for that and the most simply format to create) Cor "douglas" < XXXX@XXXXX.COM > wrote in message news: XXXX@XXXXX.COM ... > I need to put char(5) into 'selected' columns in an excel 2003 worksheet > using vb.net 2005. > The problem is some of the data looks like '00123' and ends in the > spreadsheet looking like '123'. I am losing the leading zeroes. The only > way > I know to make the selected range of columns is to make the selected > columns > a 'text' format. > Basically I need to accomplish this task with late binding. (Early > binding > and late binding do not mix well.) I am using late binding since I am > using > the pageset feature in excel 2003. > > Thus can you tell me how to solve this problem? > >