Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Run time error

Hello,

Error is :
Run-Time Error-'2147221020(800401e4)'
Automation error
Invalid syntax


code is:
Sub mfit1()

Dim RIBMApp As Object

Set RIBMApp = GetObject("RIBM")

RIBMApp.TransmitTerminalKey rcIBMF3Key
RIBMApp.Wait 3
RIBMApp.TransmitTerminalKey rcIBMF3Key
RIBMApp.Wait 3
RIBMApp.TransmitTerminalKey rcIBMF3Key
RIBMApp.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
RIBMApp.WaitForEvent rcEnterPos, "30", "0", 4, 41
RIBMApp.WaitForDisplayString "code:", "30", 4, 34
RIBMApp.TransmitANSI "mjim"
RIBMApp.TransmitTerminalKey rcIBMEnterKey
RIBMApp.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
RIBMApp.WaitForEvent rcEnterPos, "30", "0", 7, 35
End Sub

Error is in : Set RIBMApp = GetObject("RIBM")

Pls suggest ASAP
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Run time error

It happens that shai formulated :
Hello,

Error is :
Run-Time Error-'2147221020(800401e4)'
Automation error
Invalid syntax


code is:
Sub mfit1()

Dim RIBMApp As Object

Set RIBMApp = GetObject("RIBM")

RIBMApp.TransmitTerminalKey rcIBMF3Key
RIBMApp.Wait 3
RIBMApp.TransmitTerminalKey rcIBMF3Key
RIBMApp.Wait 3
RIBMApp.TransmitTerminalKey rcIBMF3Key
RIBMApp.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
RIBMApp.WaitForEvent rcEnterPos, "30", "0", 4, 41
RIBMApp.WaitForDisplayString "code:", "30", 4, 34
RIBMApp.TransmitANSI "mjim"
RIBMApp.TransmitTerminalKey rcIBMEnterKey
RIBMApp.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
RIBMApp.WaitForEvent rcEnterPos, "30", "0", 7, 35
End Sub

Error is in : Set RIBMApp = GetObject("RIBM")

Pls suggest ASAP


GetObject will return a valid ref IF the object exists. You should
check for this and if it doesn't exist then use CreateObject() to start
an instance of it.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Run time error

GS wrote on 04/18/2012 11:57 ET :
It happens that shai formulated :
Hello,

Error is :
Run-Time Error-'2147221020(800401e4)'
Automation error
Invalid syntax


code is:
Sub mfit1()

Dim RIBMApp As Object

Set RIBMApp = GetObject("RIBM")

RIBMApp.TransmitTerminalKey rcIBMF3Key
RIBMApp.Wait 3
RIBMApp.TransmitTerminalKey rcIBMF3Key
RIBMApp.Wait 3
RIBMApp.TransmitTerminalKey rcIBMF3Key
RIBMApp.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
RIBMApp.WaitForEvent rcEnterPos, "30", "0", 4, 41
RIBMApp.WaitForDisplayString "code:", "30", 4, 34
RIBMApp.TransmitANSI "mjim"
RIBMApp.TransmitTerminalKey rcIBMEnterKey
RIBMApp.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
RIBMApp.WaitForEvent rcEnterPos, "30", "0", 7, 35
End Sub

Error is in : Set RIBMApp = GetObject("RIBM")

Pls suggest ASAP



GetObject will return a valid ref IF the object exists. You should
check for this and if it doesn't exist then use CreateObject() to start
an instance of it.

Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion

Hi,
Thanks for your suggestion, but I tried to create Object its giving following
error:

Run-Time error 429:
ActiveX component can't create object

I tried the below code to create Object, pls suggest whether it is correct or
not..
Set RIBMApp = CreateObject("RIBM")
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Run time error

shai pretended :
GS wrote on 04/18/2012 11:57 ET :
It happens that shai formulated :
Hello,

Error is :
Run-Time Error-'2147221020(800401e4)'
Automation error
Invalid syntax


code is:
Sub mfit1()

Dim RIBMApp As Object

Set RIBMApp = GetObject("RIBM")

RIBMApp.TransmitTerminalKey rcIBMF3Key
RIBMApp.Wait 3
RIBMApp.TransmitTerminalKey rcIBMF3Key
RIBMApp.Wait 3
RIBMApp.TransmitTerminalKey rcIBMF3Key
RIBMApp.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
RIBMApp.WaitForEvent rcEnterPos, "30", "0", 4, 41
RIBMApp.WaitForDisplayString "code:", "30", 4, 34
RIBMApp.TransmitANSI "mjim"
RIBMApp.TransmitTerminalKey rcIBMEnterKey
RIBMApp.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
RIBMApp.WaitForEvent rcEnterPos, "30", "0", 7, 35
End Sub

Error is in : Set RIBMApp = GetObject("RIBM")

Pls suggest ASAP



GetObject will return a valid ref IF the object exists. You should
check for this and if it doesn't exist then use CreateObject() to start
an instance of it.

Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion

Hi,
Thanks for your suggestion, but I tried to create Object its giving
following error:

Run-Time error 429:
ActiveX component can't create object

I tried the below code to create Object, pls suggest whether it is correct
or not..
Set RIBMApp = CreateObject("RIBM")


Try...

Set RIBMApp = CreateObject("RIBM.Application")

...where RIBM.exe is a properly installed/registered app on your
machine. Otherwise, if it's a COM component then you need to set a
reference to it in the VBE via ToolsReferences!

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


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
run time error 1004 general odbc error excel 2003 vba Mentos Excel Programming 5 January 24th 11 02:56 PM
Error handling error # 1004 Run-time error [email protected] Excel Programming 3 May 20th 08 02:23 PM
Run Time Error 1004: Application or Object Defined Error BEEJAY Excel Programming 4 October 18th 06 04:19 PM
run-time error '1004': Application-defined or object-deifined error [email protected] Excel Programming 5 August 10th 05 09:39 PM
Befuddled with For Next Loop ------ Run - Time Error '13' Type Mismatch Error rdavis7408 Excel Programming 1 August 25th 04 03:54 AM


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