473,396 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Syntax error 800a03ea in vbscript for sub function

1
I'm running Logon Script and it is in VBScript.
when I'm calling Sub function it givving me this error
Expand|Select|Wrap|Line Numbers
  1. If InStr(strGroups, ADFS1_GROUP) Then
  2.  
  3.    MapDrive "G:", "\\xxx-xxx-ADFS-1\GROUP"
  4.  
  5. Else
  6.  
  7.   MapDrive "H:", "\\xxx-xx-ADFS\HOME"
  8.  
  9. End If
  10. Sub MapDrive(strDrive, strShare)
  11.  
  12.       On Error Resume Next
  13.       WSHNetwork.MapNetworkDrive strDrive, strShare
  14.       strMappedDrives = strMappedDrives & strDrive & " "
  15.       ie.document.all.Msg2.InnerText = strMappedDrives
  16.  
  17. End Sub 
So at the starting point of "Sub" it will give me error: " Char:1 Error:Syntax error Code:800A03EA Source: Microsoft VBScript compilatiopn error "

Can anyone tell me what I'm doing wrong here?Please.
Attached Images
File Type: png error.png (19.2 KB, 1400 views)
Feb 29 '12 #1
2 12567
Killer42
8,435 Expert 8TB
Unless what you've posted here has been chopped up for demonstration purposes, you have Sub in the middle of your code. Pretty sure that's a no-no.

Probably whatever is before that Sub needs to be closed. That is, you're probably missing and End Sub, End Function or something.
Mar 12 '12 #2
Hey Yamikp, Usually when I get these errors it's because I have missed a Else, End If or a End Sub line. If it were me? I'd change just a couple of things and make it work old school...


If InStr(strGroups, ADFS1_GROUP) Then

strDrive = "G:"
strShare = "\\xxx-xxx-ADFS-1\GROUP"

MapDrive

Else

strDrive = "H:"
strShare = "\\xxx-xx-ADFS\HOME"

MapDrive

End If

Sub MapDrive(strDrive, strShare)

On Error Resume Next
WSHNetwork.MapNetworkDrive strDrive, strShare
strMappedDrives = strMappedDrives & strDrive & " "
ie.document.all.Msg2.InnerText = strMappedDrives

End Sub


Let me know how it turns out.
- Frost
Jun 22 '18 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Robert Mark Bram | last post by:
Hi All! I have the following two methods in an asp/jscript page - my problem is that without the update statement there is no error, but with the update statement I get the following error: ...
29
by: shank | last post by:
1) I'm getting this error: Syntax error (missing operator) in query expression on the below statement. Can I get some advice. 2) I searched ASPFAQ and came up blank. Where can find the "rules"...
9
by: Kevin | last post by:
Hi, I am getting a syntax error Microsoft VBScript compilation error '800a03ea' Syntax error On the code below. The error references the "End Select" line Can anyone help me with what I am...
5
by: Joe | last post by:
Hello: For some strange reason, on a certain page of my site I cannot create sub-routines. Everytime I get the same error, no matter where this subroutine is, what it does, and what its name...
5
by: NanQuan | last post by:
I'm hoping someone can help me solve this error since I am at a total loss here. Usually I don't bother posting on any forums or groups on the internet and prefer to solve stuff myself but this is...
1
by: solomon_13000 | last post by:
connection.asp: <% Sub RunQueryString (pSQL,parms) on error resume next Set conn = Server.CreateObject("ADODB.Connection") conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &...
4
by: makinha | last post by:
Hello, I am getting a syntax error Microsoft VBScript compilation error '800a0400' Expected statement line 49 Case 164 To 269 ---------------^ (The error references...
1
by: mickymtl | last post by:
In an ASP file using vbscript and JET 4.0: In the Access2000 database the date_added field is set as general date. Why does "SELECT * FROM traffic_log WHERE date_added >= " &...
2
by: mdock | last post by:
Hello, I have a javascript grid on my ASP page which displays information about the history of specific units produced in our manufacturing facility. One of the results is the order number on...
1
by: qdoet | last post by:
Could I have a problem in the following syntax error: Deprecated: Function eregi () is deprecated in C: \ xampp \ htdocs \ holiday-shelter \ feedback_kirim.php on line 8 Your email is wrong ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...

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.