473,671 Members | 2,311 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

800A0005 Inv. Procedure Call or Argument on JUST MY COMPUTER

I copied the code below and saved it as a .vbs file. Can anyone tell me why
I would be getting an 800A0005 error while another XP Pro. and a 2000
machine can run it just fine? The error is "An Invalid Procedure Call or
Argument" and it's on line 40, char. 1 which is this line: "set fh1 =
oFileSys.Create TextFile(tmp)"

Thanks in advance to anyone who can help.

GJ
'FunDialogBox.v bs
'v1.2 March 2001
'Jeffery Hicks
'j*****@quilogy .com http://www.quilogy.com
'Functions to display MS Common Dialog Box. You can use these functions to
provide
'more options and flexibility for opening and saving files.

'
*************** *************** *************** *************** *************** *
*****
' * THIS PROGRAM IS OFFERED AS IS AND MAY BE FREELY MODIFIED OR ALTERED AS *
' * NECESSARY TO MEET YOUR NEEDS. THE AUTHOR MAKES NO GUARANTEES OR
WARRANTIES, *
' * EXPRESS, IMPLIED OR OF ANY OTHER KIND TO THIS CODE OR ANY USER
MODIFICATIONS. *
' * DO NOT USE IN A PRODUCTION ENVIRONMENT UNTIL YOU HAVE TESTED IN A
SECURED LAB *
' * ENVIRONMENT. USE AT YOUR OWN RISK. *
'
*************** *************** *************** *************** *************** *
*****
'On Error Resume Next
'The first part of this script is simply demo commands of the functions
which do the real
'work in using the Common Dialog Box.

'test of Open File function
dim WshShell
Set WshShell = WScript.CreateO bject("WScript. Shell")

strFileOpen=Ope nDlg(UCASE(wscr ipt.Scriptname) &" - Open File","My
Filter","*.vbs" )

'If StrFileOpen="" then
'wscript.echo "Nothing selected or cancelled"
'wscript.quit 'quit if nothing was selected or user cancelled
'else
'WshShell.Run ("notepad.ex e " & strFileOpen)
'End If

'test of Save File function
dim oFileSys,fh1

set oFileSys=Create Object("Scripti ng.FileSystemOb ject")
tmp=saveDlg(UCA SE(wscript.Scri ptname) &" - Save File","Text
File","*.txt"," defaultname")

set fh1 = oFileSys.Create TextFile(tmp)
fh1.Write "This is a test file" & VBCRLF & Now
fh1.Close

set oFileSys=Nothin g
set fh1=Nothing
set WshShell=Nothin g

wscript.quit
'////////////////////////////
'/ Open Common Dialog /
'////////////////////////////
Function OpenDlg(strTitl e,strDesc,strEx t)
'strTitle is value for Dialog Box title
'strDesc is the name of user specified filter such as VBScript Files
'strExt is a user specified extension for secondary filter in *.ext format

Dim objDlg
On Error Resume Next
set objDlg = wscript.CreateO bject("MSComDlg .CommonDialog")
objDlg.Filter = "All Files (*.*)|*.*|" & strDesc & " (" & strExt & ")|" &
strExt
objDlg.DialogTi tle=strTitle
objDlg.FilterIn dex = 2
objDlg.MaxFileS ize = 260
objDlg.CancelEr ror = true

objDlg.ShowOpen
OpenDlg = objDlg.FileName

Set objDlg=Nothing

End Function

'////////////////////////////
'/ Save Common Dialog /
'////////////////////////////
Function SaveDlg(strTitl e,strDesc,strEx t,strFile)
'strTitle is value for Dialog Box title
'strDesc is name of user specified filter such as VBScript Files
'strExt is a user specified extension for secondary filter in *.ext format
'strFile is the name of the file to be saved

Dim objDlg
On Error Resume Next
set objDlg = wscript.CreateO bject("MSComDlg .CommonDialog")
objDlg.Filter = "All Files (*.*)|*.*|" & strDesc & " (" & strExt & ")|" &
strExt
objDlg.DialogTi tle=strTitle
objDlg.FilterIn dex = 2
objDlg.MaxFileS ize = 260
objDlg.CancelEr ror = true
objDlg.Filename =strFile

objDlg.ShowSave
SaveDlg=objDlg. Filename
Set objDlg=Nothing

End Function

'EOF
Nov 20 '05 #1
1 5330
"George W. Jackson" <ja**********@h otmail.com> schrieb
I copied the code below and saved it as a .vbs file. Can anyone tell
me why I would be getting an 800A0005 error while another XP Pro. and
a 2000 machine can run it just fine? The error is "An Invalid
Procedure Call or Argument" and it's on line 40, char. 1 which is
this line: "set fh1 = oFileSys.Create TextFile(tmp)"


I don't know VB script, only VB.NET. This is a VB.NET group. Please turn to
a VB script group.
--
Armin

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3703
by: J. Thomas | last post by:
I am getting the following error: Session(strEftEffDt)= ASPUtilities error '800a0005' Invalid procedure call or argument /sec/PrintAllPDFs.asp, line 154 Anyone have any ideas?
0
6695
by: Nashat Wanly | last post by:
HOW TO: Call a Parameterized Stored Procedure by Using ADO.NET and Visual C# .NET View products that this article applies to. This article was previously published under Q310070 For a Microsoft Visual Basic .NET version of this article, see 308049. For a Microsoft Visual C++ .NET version of this article, see 310071. For a Microsoft Visual J# .NET version of this article, see 320627. This article refers to the following Microsoft .NET...
1
7669
by: Mark Dicken | last post by:
Hi All I have found the following Microsoft Technet 'Q' Article :- Q210368 -ACC2000: How to Pass an Array as an Argument to a Procedure (I've also copied and pasted the whole contents into the bottom of this email)
5
2801
by: Seong-Kook Shin | last post by:
Hi, I'm reading Steve's "C Programming FAQs" in book version, and have two question regarding to Q11.16 ... Also, a `return' from `main' cannot be expected to work if data local to main might be needed during cleanup. (Finally the two forms are obviously not equivalent in a recursive call to `main'). My questions are
3
4246
by: Jason | last post by:
I have an ASP.NET application in which I would like to call my button click event (imgSubmitSearch_Click) on the page load if certain criteria are met. Is this possible? What is the correct syntax to be able to programmatically have my imgSubmitSearch button clicked? I tried the obvious, Call imgSubmitSearch, but intellisense doesn't like that due to the sender / e arguments. Private Sub imgSubmitSearch_Click(ByVal sender As...
8
1476
by: R.A.M. | last post by:
Hi, I am learning SQL Server 2005. I need to call .NET assembly procedure from T-SQL. Here's part of my assembly: using System; using System.Data.Sql; using System.Data.SqlClient; using System.Data.SqlTypes; using Microsoft.SqlServer.Server;
7
9703
by: Siv | last post by:
Hi, I have a stored procedure that I want to execute and then wait in a loop showing a timer whilst it completes and then carry on once I get notification that it has completed. The main reason for this being to stop the user thinking the application has frozen when in fact it is just waiting for a long SP to complete. Another reason for doing it like this is that I also have had a problem in the past where the SP takes longer than the...
6
10485
by: HaggardSmurf | last post by:
Private Sub Downloader1_DownloadComplete(MaxBytes As Long, SaveFile As String) If MsgBox("Donwnload Finished. Would you like to install now?", vbInformation + vbYesNo, "Blue Cherry Media Player") = vbYes Then Filename = App.Path + "\BCMP " + Site + ".zip" Call OpenDownload End If End Sub Sub OpenDownload() Shell Filename, vbNormalFocus End Sub
7
3950
by: Karl | last post by:
Is there a way to run a procedure in a different open database?
0
8473
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8390
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8911
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8819
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8597
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8667
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7428
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6222
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
2808
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.