Expected List Separator Error
I'm trying to separate two values so it will do the same to the both of them eg
If InStr(1, oFiles.Name, ".mp3" ".flac") Then
I'm just not sure how to separate the ".mp3" and the ".flac" so it will do the same thing to both of them
Sorry about the rubbish explanation,
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Compile Error "expected List Or Separator"
I get a compile error at the very end of this line...seem to be missing a bracket or quotation marks but its driving me insane!! Any help??
strsql = "INSERT INTO tbl_headerrecord (recordid,acno,awbno,shipdt,commitdt,committime,exccode,excprocessid,ref,custqual,formid,trackid,shi ppername,shipperco,shippercity,shipperst,shipperzip,shipperctry,recname,recco,recaddr,reccity,recsta te,reczip,recctry,servicecode,invoice,totcharge,totqty,totweight,declaredvalue,codflag)"
VALUES (" & int_recordid & "," & int_acno & "," & int_awbno & "," & date_shipdt & "," & date_commitdt & "," & date_committime & "," & str_excode & "," & str_excprocessid & "," & str_ref & "," str_custqual & "," & str_formid & "," & str_trackid & "," & str_shippername & "," & str_shipperco & "," & str_shipperaddr & "," & str_shippercity & _
& "," & str_shipperst & "," & str_shipperzip & "," & str_recname & "," & str_recco & "," & str_recaddr & "," & str_reccity & "," & str_recstate & "," & str_reczip & "," & str_rectry & 2," & str_servicecode & "," & str_invoice & "," & str_totcharge & "," & str_totqty & "," & str_toweight & "," & str_declaredvalue & "," & str_oversizeqty & "," & str_codflag & _
& "," & str_danggoods & "," & str_filler & "," & str_received & ")"
Error 70, Error 91 And Error List Separator
I've got this problem:
I created a folder with visual basic
When I try to delete it(and only that dir...) with this code:
>Dim fso As FileSystemObject
>fso.DeleteFolder defaultInstallFolder & "Config", True
I obtain "Permission denied", just like if folder is in use.. but it's in use from vb!
(The utility "Who lock me?" tells me that it's locked form vb)
I tried to change current dir to parent dir of folder to delete, but i didn't help.
If I try to delete directory just after have created, in another piece of code, the error changes:
"Object variable or With block variable not set"
I've read that perhaps it's a Microsoft bug, to solve using properties, so I made:
>Dim fso As FileSystemObject
> Public Property Get ob() As FileSystemObject
> ob = fso
> End Property
> Public Property Let ob(Object As FileSystemObject)
> fso = Object
> End Property
and tried to delete it using:
>Get ob.DeleteFolder defaultInstallFolder & "Config", True
but the error now is "Expected: list separator"
or I tried:
>Get ob().DeleteFolder defaultInstallFolder & "Config", True
>Dim fso2 As FileSystemObject
>fso2 = Get ob (compile error)
The question is: HOW THE HELL CAN I DELETE THE FOLDER ? :-)
I can't understand the problem, I can easily delete other directories created in the same code 2-3 lines above, but THAT directory not. And neither in different Pcs, same problem.
I can only use vbcce5..
Thank you for responses!!
I am using Visual Basic 6.0 on a Win2K platform and encounter a problem with list separators.
I try to open a CSV file with "," as a separator, but VB doesn't allow it. Using ";" works fine although the list separator in the regional settings is a "," and decimal points are all "."
Do you have any idea where the problem lies because my 2 hours investigations were not really productiv
Thanks a lot for your advices.
Public Sub Poke(Rogue Spear As String, Address As Long, Value As Integer, byteamount As Long)
it errors this: "Expected: Separator or )"
it has something to do with "Rogue Spear" the space between Rogue and Spear... and im totally lost on how to fix it.. . . .
List Separator In VBA 5.0
Using VB for Application 5 (VBA 5.0) in MS-Excel 97 on Win95-PC
I'm saving an XL97-sheet as csv-file with following command:
Application.ActiveWorkbook.SaveAs FileFormat:=xlCSV, _
The problem is that the list separator used for
this csv-file (",") isn't the one defined in the
Windows system preferences (semi-colon ";").
What I would like.
But when I do the same manually, it works! The cell
contents are separeted with ";".
Is this a bug? Because when checking my Windows
I also get ";"!
Can someone explain me what is wrong?
Change List Separator For A Csv File In Vb
I have an export button from which i open an excel workbook, i insert rows and save the file as .csv file
moExcel.ActiveWorkbook.SaveAs file_path & "
amefile" & Format(Now, "YYYYMMDDHHMMSS") _
& ".csv", excel.XlFileFormat.xlCSV
I have already changed in my regional settings the list separator to ";".
when i try to open the saved file in notepad it shows that the seperator is still "," and when opening it back in excel it shows each row in the first cell with the data seperated by ",".
Or if I open excel and save the file as csv file it is saved correctly, and when opening the file in notepad i get the data seperated by ";".
Is there any command that i can specify the list separator for my file in vb?
I need help plz.
thank u for ur time.
Compile Error Expected Array ERROR: HELP ME
I have a Tree functions which is used to manipulate, display, delete, rename, add items in a Tree Strucure. and in my program I am trying to add an item to my tree structure. I am using and chaging the codes from another program which does treeitems add similar to what I want to do. However I am getting this error. I am fairly new to VB and need to know where i am going wrong. I am getting my error in the following Function called FindNewIndex. Questions please let me know. thanks in advance
Public Function FindNewIndex(MyTV As TreeView, MyParent As Variant) Dim NodX As NodeBiggest = 0For Each NodX In MyTV.NodesIf Not (NodX.Parent Is Nothing) ThenIf NodX.Parent.Key = MyParent Thena = NodX.Keyb = InStrRev(a, "*")c = CInt(Right(a, Len(a) - b)) ->>> ERRORIf c > Biggest ThenBiggest = cEnd IfEnd IfEnd IfNextFindNewIndex = Biggest + 1 End Function
THIS IS THE FUNCTION CALLING FindNewIndex
Private Sub AssOpsFailModeAdd_Click() step2:temp = InputBox("Enter the name of the new failure mode", TV.SelectedItem.FullPath)If CheckInput(temp) = False Then GoTo step2If temp = "" Then Exit Subb = FindNewIndex(TV, TV.SelectedItem.Key)AddTVItem TV, TV.SelectedItem.Key, TV.SelectedItem.Key & "*" & b, temp, "Mode"TV.Nodes(TV.SelectedItem.Key & "*" & b).EnsureVisible End Sub
Last edited by plenderj on 08-05-2003 02:35PM
Expected Error! Need Help!
i'm new to visual basic and i'm developing a program for my final year project.
this is the code that i've currently developed.
Private Sub cmdShowPlot_Click()
Const DeflecNode1 As Currency = 0.001
Const DeflecNodeN As Currency = 0.001
Const Area As Long = 7183 * 10 ^ -6
Const e As Double = 210 * 10 ^ 9
Const l As Long = 0.7
Const T As Long = 20 * 10 ^ 6
Const k As Long = Area * e / l
Const k1 As Long = 0.1 * k
Const k2 As Long = k1
Dim n As Integer
Dim DeflecLHS As Currency
For n = 1 To txtNmbrOfSleeper.Text
If n = 1 Then
DeflecLHS(n) = DeflecNode1
If n = 2 Then
DeflecLHS(n) = (1 + (k1 / k)) * DeflecNode1
DeflecLHS(n + 1) = (2 + (T / k)) * DeflecLHS(n) - DeflecLHS(n - 1)
For n = 2 To txtNmbrOfSleeper.Text + 1
ForceLHS = k * ((1 + (T / k)) * DeflecLHS - DeflecLSH(n - 1))
StifnessLHS = ForceLSH / DeflecLHS
and i'm getting "expected array" error message.but i noticed if i delete the bracket i.e (n), (n-1), i won't have the error. but i really need it. please help me solve this problem.
Error: Expected As
This is my first shot at a simple array and the use of an InputBox. VB doesn't like the code in the Inputbox line and I get the error - expected As. I've tried all ways to correct this line... (code below)what have I done wrong?
Private Sub Form_Load()
Dim I As Integer
Dim Name(3) As String
For I = 1 To 3
Name(1) = InputBox("Enter names", "Array Demo", "insert here")
'just print names on form
For I = 1 To 3
Print "Name is"; Name(I)
Expected Array Error
Could someone tell me why I am getting an "Expected Array" error with Mondex highlighted?
Dim cMonth As Integer
Dim cDay As Integer
Dim cYear As Integer
Dim Mondex As String
cMonth = Left(DTPicker1.Value, 2)
cDay = Mid(DTPicker1.Value, 4, 2)
cYear = Right(DTPicker1.Value, 4)
Mondex = Left(Monthtxt(cMonth).Text, 3)
For j = 1 To 7
If Val(Mondex(j).Caption) = 1 Then 'I get the error on this line.
Expected Array Error
I am getting the message: "Compile Error: Expected Array"
Dim count1 As Integer
count1 = 0
Do While count1 <= x
count1 = count1 + 1
On the strMessageNumber. Can I not substitute a variable for an array number?
What am I doing wrong?
Thanks a million !
Error: Array Expected
Public Planets As Planet
'In a function
Highlight: ReDim Planets(Amount)
Error: Array Expected
I have no idea, help...
Error: Expected Array
I get error "Expected array" and it takes me to this and highlights "Loc"
anyone know what the problem is.
' Function to quickly digest a file into a hex string
Public Function DigestFileToHexStr(FileName As String) As String
Open FileName For Binary Access Read As #1
Do While Not EOF(1)
Get #1, , ByteBuffer
If Loc(1) < LOF(1) Then
ByteCounter = ByteCounter + 64
ByteCounter = ByteCounter + (LOF(1) Mod 64)
DigestFileToHexStr = GetValues
Expected Array Error
I am getting the total of a column in listview and then adding that total to a label. I then want to format it in the format of ##:## and I am getting a "Expected Array" Error. This is my code. Please advise. The error happens on the highlighted part of the code.
Private Sub Form_Load() 'declare some variables Dim lngIndex As Long, lngTotal As Long 'apply the page color scheme to the form PageColorScheme Me 'center the form CenterForm Me 'keep the form from going behind any others KeepScreenOnTop = SetWindowLong(Me.hwnd, GWL_HWNDPARENT, frmControlPanel.hwnd) 'populate some labels 'add the date to this label lblDate(1).Caption = Date 'add everything within subitems(8) and get 'a total and display that total in the 'lblTime label For lngIndex = 1 To lvwTimeLog.ListItems.Count lngTotal = lngTotal + lvwTimeLog(lngIndex).SubItems(8) Next [hl]lblTime(1).Caption = Format(lngTotal(Time, "HH:NN"))[/hl]End Sub
Compile Error Expected:)
Do While (nom txtName.Text) And (Not EOF(1))
I get the Compile error: Expected ) with the above line of Code.
Any idea whats wrong with this Please.
Expected Identifier Error
Hello all, I am new to this area and wanted to see if someone could help me with this. I am still learning vb and have been practicing with some code. I am getting the following error while trying to run this code:
Option ExplicitSub WriteEvent(Event As String, Color As Variant) Server.MessagesHost.SelStart = Len(Server.MessagesHost.Text) + 1 Server.MessagesHost.SelColor = vbBlack Server.MessagesHost.SelText = Now & ":" Server.MessagesHost.SelColor = Color Server.MessagesHost.SelText = " " & Event & vbCrLf Server.MessagesHost.SelColor = vbBlack Server.MessagesHost.SelStart = Len(Server.MessagesHost.Text) + 1 End Sub
I am getting the error "Expected Identifier" Under Event. Could someone help me with this..
Error '424' Object Expected
I am writing an outlook addin which adds a toolbar each time the user opens a new Inspector, it works fine however the second time i open an email and click on the button i get the following error: error '424' object variable or with block variable not set.
it breaks out on the following code:
If oBtn.Tag = "Inspector" Then
here's my code from the connect
Private Sub myInspectors_NewInspector(ByVal Inspector As Outlook.Inspector) Dim tmpBar As CommandBar Dim CBExists As Boolean If myInspectors(1).CurrentItem.Class = olMail Then MsgBox "here" Set myInspector = myInspectors(1) Set poMailItem = myInspectors(1).CurrentItem Set myCommandbar = myInspector.CommandBars.Add("AddinBar") Add_CtlBtn (True) End IfEnd Sub Private Sub Add_CtlBtn(NewInspector As Boolean) Dim cb As CommandBar Set cb = myCommandbar Set oEvt = New CBTnEvent Set oEvt.oBtn = cb.Controls.Add(msoControlButton) With oEvt.oBtn If NewInspector Then MsgBox "in NewInspector" .Tag = "Inspector" Else .Tag = "Explorer" End If .Style = msoButtonIconAndCaption .FaceId = 67 .Caption = "Junk Mail" End With cb.Visible = True cb.Position = msoBarTop oBtns.Add oEvt Set cb = NothingEnd Sub
here's my code from within the oEvt class
Private Sub oBtn_click(ByVal ctrl As Office.CommandBarButton, CancelDefault As Boolean) Dim bl As Boolean bl = FindMailItem If bl Then JunkMailEnd Sub
IF ANYONE CAN HELP ME I WOULD REALLY APPRECIATE IT.
Expected Array Error
I get an "Expected Array" error message when reading arr(0) = 2 in the following code. What's up? Also, am I calling the Function correctly?
Private Sub Command1_Click()
Public Function ArrayStdDev(arr As Integer, Optional SampleStdDev As Boolean = True, Optional IgnoreEmpty As Boolean = True) As Double
Dim sum As Double
Dim sumSquare As Double
Dim value As Double
Dim count As Long
Dim index As Long
arr(0) = 2
arr(1) = 6
Error: Too Few Parameters.expected 1.
I am trying to connect to a dbase file via ADO using the code below. If I drop the WHERE portion of strQuery then it works. However, I don't see anything wrong the WHERE portion of the query. The error I receive is "too few parameters. Expected 1." Any ideas please? Thanks.
strQuery = "SELECT * FROM BMs.dbf WHERE bncmrk = 'A1'"
Set adoRS = New ADODB.Recordset
adoRS.Open strQuery, db, adOpenStatic, adLockReadOnly
Compile Error! Expected =
whats wrong with my code?
Private Function CreateRecord(Optional ByRef sZipCode As String, _
Optional ByRef sZipZone As String, _
Optional ByRef sStartAddress As String, _
Optional ByRef bEOF As Boolean = False) _
when i use createrecord(tempzip(i),Zone,Start_ad, Lineoftext$=false)
im having an error in this part it says "compile error..expected =" what seems to be wrong help
i dont know why im getting this error because i used an equal sign in the bolean part.
Edited by - VBcityloyalfan on 12/12/2004 11:08:00 PM
Expected End Of Statement Error
Can't figure out what is wrong with this. Trying to figure out how to use the ScriptControl. When I create a form with a text box and put the code in the testbox then run the sc.addcode text1.text it works. When I try it the following way it does not
strCode = "Sub NameMe()" & vbCrLf & _
" Dim strName as string" & vbCrLf & _
" strName = InputBox(""Name?"")" & vbCrLf & _
" MsgBox ""Your name is "" & strName" & vbCrLf & _
sc.AddCode strCode ' I get THE error HERE "Expected End of Statement"
Automation Or Expected Interface Error
I keep receiving this error when running a .exe on a user's computer. I suspect it happens when trying to create an ADO connection. The program sits out on our network. I assumed that it was because the computer didn't have the data access components, so I packaged the program up and installed it on the user's computer. I'm still receiving the same error. Does the mdac_typ.exe contain the data access components for ADO? If not, can anyone tell me what I need to include with the package in order for the program to run correctly? I am on a Windows XP Pro box and the computer I'm installing on is a Windows 2000 Pro.
Run-time Error: Too Few Parameters. Expected 1
I had made a ADO database connection to an Access database in my VB application. This was working fine until I replaced the database with one that I had added password protection. Once I found that the application couldn't access it. I remembered the password and removed it. But sense I have not been able to re-establish connectivity to the database.
The error I am getting is: "Too few parameters. Expected 1." This is referencing the open method of the recordset. Apparently connecting to the database is fine but I can not retrieve data from the database. I have all parameters set and have tried different open methods such as executing a stored procedure and sending a select statement. I prefer to use the stored procedure.
Here is the code in question, with commented out protection and the alternative method:
Private Sub DataEnvironment1()
Compile Error: Expected End Of Statement
I am totally new to VB, but I have a chunk of VB5 code that I need to run in VB6.
The VB5 code is in the form of a .txt file and this is causing problems when I open it in VB6 as I get an error on the first line stating Compile Error: Expected end of statement (though it happens for every line).
I think this is because the file was created in .txt and therefore has certain formatting.
I would appreciate if any one could give detailed steps on what I should do to get the code running, id the only option to re-enter the code in VB6?
Compile Error: Expected: Expression
Guys and Gals,
Please help! I have held on to a macro for quite a while that a former colleague developed for me. It uses information from MSP to create a slide in powerpoint. I have set up my file structure correctly as per the declarations of the macro, but when i have changed the DIR_ROOT to reflect where the templates are to be found, I get the error message found in the title. Below, I have listed the code used (declarations only - full code is too long to post). It is where I have specified the file path where the error occurs and the first '' is highlighted. I have used '*' to show the server I use (the folders are shared).
Const DATE_PCN_START = "01/01/2006"
Const DATE_PCN_END = "31/12/07"
Const DIR_ROOT = \Uk*******groupCorp Services Programme DirectoryProgramme OfficeCOG_Programme_Office_WorkbookSchedule_Management
Const DIR_TEMPLATE = DIR_ROOT & "Y. Templates"
Const DIR_ICN = DIR_ROOT & "x. New ICN"
Const TEMPLATE_ICN = DIR_TEMPLATE & "ICN_TEMPLATE.ppt"
Const S_PROJECTTITLE = "SD Transformation Programme plan"
Const COL_PIXELWIDTH = 49.5
Const ROW_PIXELSTART = 70
Const RECT_JAN = "Rectangle 22"
Const RECT_FEB = "Rectangle 11"
Const RECT_MAR = "Rectangle 12"
Const RECT_APR = "Rectangle 13"
Const RECT_MAY = "Rectangle 14"
Const RECT_JUN = "Rectangle 15"
Const RECT_JUL = "Rectangle 16"
Const RECT_AUG = "Rectangle 17"
Const RECT_SEP = "Rectangle 20"
Const RECT_OCT = "Rectangle 19"
Const RECT_NOV = "Rectangle 18"
Const RECT_DEC = "Rectangle 21"
Please help meeeeeeee!!!!!!
Many thanks to you all.
Expected Function Or Variable Error W/FSO
I get an error using fso , expected function or variable
Dim fso As New FileSystemObjectDim CF Set CF = fso.CopyFile(Dir1.Path & "" & File1.FileName, App.Path & "" & "pdfs" & "" & File1.FileName)
SQL Parameter Error: Too Few Parameters. Expected 2
I receive the error: Too few parameters. Expected 2. when I run the below code. I have never written a parameter in VB can someone help me out with what is wrong with the below code?
Data1.RecordSource = "PARAMETERS [FROM DATE] DateTime [TO DATE] DateTime;"
Data1.RecordSource = "SELECT * from MASTER where DATE_OPENED between [FROM DATE] AND [TO DATE]"
Error 3061 Too Few Parameters. Expected 2.
I have a dbgrid on a form I am using this grid to show information from tblCard_Inventory that has a status of 'U'. I would like for the user to double click on a row in the grid and no longer have the that row available and at the same time insert the information selected set to tblAssigned_Cards. I would also like for the status in the tblCard_Inventory to change from 'U' to 'A' once the double_click event occurs.
My problem is: Every time I double click on the row I get the Run-time error '3061': Too few parameters. Expected 2.
I lost and I have no idea where to go from here to correct the error.
Can anyone plz help me!
Sqlcmd End Of Statement Expected Error
sqlcmd -S WScript.Arguments(0) -i "C:Documents and Settingsmike.jonesDesktopDental_Combined_Template_Script.sql"
I am trying to use sqlcmd to run a tsql script from a VBScript app. Argument 0 is the server name, and comes in the format of \xxx-xxx. I currently have the tsql file on the desktop of the server, and have it in the code as you see above.
I keep getting the error message of "Expecting end of statement 17,11" the sqlcmd code is on line 17, so the error is at the space between (0) and -i. I have used many different variations here so I am getting very annoyed that it won't work. I also wonder if anyone know how to solve the problem of the file path having a space in the doc and settings part. I have enclosed it in "" so far but I see on other examples that it should not be.
Can anyone see why I am getting the error and how to solve it?
Error ByRef: Expression Expected.
I use a vb6.0 compiler. I am trying to create a thread. For that I use the CreateThread(). The 1st parameter in the function (in c dialect) is a pointer to a SECTRITY_ATTRIBUTES structure. But in usual practice we pass a null value as 1st parameter.
How to pass it in vb6?
I've tried the following:
CreateThread(ByVal 0&, ...
CreateThread(ByRef ... I cannot use this one at all. It gives me a compiler error saying "expression expected"
Runtime Error 3061: Too Few Parameters Expected
I build a program in VB 6.0.
Ít's quite complex but it works perfect on my machine.
No i try to run it on a the pc of the client, i'll get an error.
"Runtime Error 3061: Too Few Parameters expected"
It works on my pc, so what can be the problem??
And how can i get the same error on my computer, so i can test it where it goes wrong.
Desperately Need Help With An Expected Error 2147217913 And 2147217900
I have a database program at work created by VB6 and Ms Access (where it stores data). I enter the data daily via VB form interface and at end of month and enter the date and year to run the report ( where it generated data for the report). I have used this for few years now. Until I try to run the report for January 2005, it show an error dialogue box
" An unexpected error  ocurred. [ Microsoft][ODBC Microsoft Access Driver] Dat type mismatch in criteria expression." Then I click the OK button, another dialogue box showed "An unexpected error  ocurred. [Microsoft][ODBC Microsoft Acess Driver] Number of query values and destination fields are not the same."
If I enter any months in 2004 it works fine. If I enter any month in 2005 then the error message shown.
Can someone please help? It's urgent. thanks in advance.
Error : Values Does Not Fall Within The Expected Range.
please help to everyone,
i use this code in vb.net
Report.Sections(3).AddFieldObject(rsMaster("Code"). Value, 500, 0)
it has an error Values does not fall within the expected range. what is the specific range values for this code.
Getting Expected End Of Statement Error Code 800a0401
getting expected end of statement error code 800a0401 when using DIM HourGlass As HourGlass getting that error and code for the As
Some one help please below is the what i am using it with
Dim HourGlas As HourGlass
Set HourGlass = New HourGlass
Private Sub Class_Initialize() 'Show HourGlass
Screen.MousePointer = vbHourglass
Private Sub Class_Terminate()
Screen.MousePointer = vbDefault
Compile Error - Expected Function Or Variable
This the error i get from clicking on the command with this code:
Code:Private Sub cmdForward_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Private Sub cmdForward_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If WindowsMediaPlayer1.Controls.fastForward Then
What can i do to not get the error?
I like donkey, donkey don't lie...
Compile Error: Expected Function Or Variable
i get this error message "Compile error: Expected Function or variable" when i enter a number or text in the text box. This code is highlighted.
Private Sub txtCustTitle_KeyPress(KeyAscii As Integer)
KeyAscii = CheckKey(KeyAscii) 'this is highlighted
I am sending u project. Can u plz correct and let me know any changes.
Thank you for ur help in this matter.
Compile Error Expected Function Or Variable
I'm doing my first experiment with a control array.
I have 5 command buttons in the control array cmdImagePicture
Code:Private Sub cmdImagePicture_Click(Index As Integer)
If cmdImagePicture_Click(Index) = 0 Then
txtOutput = "cmdImagePicture_Click(Index) = 0"
'imgCoolbuddy.Picture = App.Path & "dancing-coolbuddy.gif"
compile error expected function or variable
Code:Private Sub cmdImagePicture_Click(Index As Integer)
If cmdImagePicture_Click(Index) = 0 Then
'txtOutput = "cmdImagePicture_Click(Index) = 0"
imgCoolbuddy.Picture = App.Path & "dancing-coolbuddy.gif"
compile error expected function or variable
How do I fix this
Edited by - webmanoffesto on 11/3/2003 6:24:31 AM
FTPCommand - Getting Compile Error Expected Array
I've successfully used many of the wininet functions but I'm getting the following error when trying to use FTPCommand.
Compile Error - Expecting Array
Here is my code:
Public Declare Function FtpCommand Lib "wininet.dll" _
Alias "FtpCommandA" ( _
ByVal hFtpSession As Long, _
ByVal fExpectResponse As Boolean, _
ByVal dwFlags As Long, _
ByVal lpszCommand As String, _
ByVal dwContext As Long, _
ByVal phftpCommand As Long) _
I have also tried As Boolean
rc = FTPCommand(hConnection, False, dwType, lpszCommand, 0,0)
My connection works fine so the value in hConnection is valid.
I tried both True and False for dwType
I set lpszCommand = "Quote SITE lrecl=48,BLKsize=0,FileType=seq"
I also tried it without Quote
Why does VB think I'm referring to an Array?
This is very important to complete my project so any help would be very much appreciated.
Compile Error : Expected Array - HELP NEEDED
I have a Tree in functions and in my program I am trying to add an item to my tree structure. I am using and chaging the codes from another program which does treeitems add similar to what I want to do. However I am getting this error. I am fairly new to VB and need to know where i am going wrong. I am getting my error in the following Function called FindNewIndex.
Public Function FindNewIndex(MyTV As TreeView, MyParent As Variant)
Dim NodX As Node
Biggest = 0
For Each NodX In MyTV.Nodes
If Not (NodX.Parent Is Nothing) Then
If NodX.Parent.Key = MyParent Then
a = NodX.Key
b = InStrRev(a, "*")
c = CInt(Right(a, Len(a) - b)) ->>> ERROR
If c > Biggest Then
Biggest = c
FindNewIndex = Biggest + 1
THIS IS THE FUNCTION CALLING FindNewIndex
Private Sub AssOpsFailModeAdd_Click()
temp = InputBox("Enter the name of the new failure mode", TV.SelectedItem.FullPath)
If CheckInput(temp) = False Then GoTo step2
If temp = "" Then Exit Sub
b = FindNewIndex(TV, TV.SelectedItem.Key)
AddTVItem TV, TV.SelectedItem.Key, TV.SelectedItem.Key & "*" & b, temp, "Mode"
TV.Nodes(TV.SelectedItem.Key & "*" & b).EnsureVisible
Compile Error: Expected Variable Or Procedure, Not Method
I'm not sure why my prog is doing this. i am using this code and i have it in it's own module and i'm calling it using this code
Dim theSong As String
theSong = FindFile(dirMain.Path, txtArtist)
anybody know why i'm getting this error? thanks for the help
Error: Array Or User-defined Type Expected
Sub FourierTransform(NumSamples As Long, RealIn() As Double, ImageIn() As Double, RealOut() As Double, ImagOut() As Double)
^ That's the arguments to the Sub I'm calling on. I've declared my arguments as doubles, cept for the first, which i've declared as long:
Blah = Array(1, 0, 2, 3, 5)
Blah2 = Array(1, 0, 2, 3, 5)
Blah3 = Array(1, 0, 2, 3, 5)
Blah4 = Array(1, 0, 2, 3, 5)
FourierTransform 44100, Blah, Blah2, Blah3, Blah4
For some reason it doesn't treat the variables as arrays...I've tried typing them as Blah(), Blah2(), etc. but still not luck. Can anyone help?
Excel ISAM Error 3274 (External Table Isn't In Expected Format)
I am reading and writing to excel file using the below code and every thing was running OK since I started the application before three months:
Set DBdist = DBEngine.Workspaces(0).OpenDatabase(ExcelFileNm, False, False, "excel 8.0; hdr=yes;")
SQLEqNewRecords = "select * from [IBIPMPOS$]"
Suddenly, I am getting error # 3274 (External Table Isn't in Expected Format) , I search for solution to this error every where but failed to know the reason causing it.
Appreciate your help and if any one experience this error before
Import Text File - "," Separator Error - Access 2000
I get "text file specification field separator matches decimal separator or text delimiter" message when i try to import text file into table (bew of existing), even when i'm not using a import spec, & it fails to import.
A slice of a line of data is:
How do i convert it to just comma delimiter without the quotes cos this should be ok. Its approx 100k records.
"Runtime Error '430' Class Does Not Support Automation Or Does Not Support Expected..
I am enhancing my company current system in VB. I tried to install the new system in client pc for testing. after succesful installation, when I tried to start to run one of the module after log in, they showed an error message as follows:
"Runtime error '430' class does not support Automation or does not support expected interface"
I found certain solution from website, they suggested to un-register the dll and re-register. between, i never register any dll or exe through regsvr32. For this case, is the dll still is the cause for the error?
If anyone can help me, I am very thankful for that.
UBound "Expected Array" Error With Split.
I'm getting an "Expected array" error message when using UBound after the Split function, and I dont know why.
Private Sub Form_Load() Dim strEntireFile As StringDim strFilePath As StringDim strList As StringDim X As IntegerDim iFile As Integer iFile = FreeFile strFilePath = "A:menumenu.ini" Open strFilePath For Input As #iFilestrEntireFile = Input(LOF(iFile), #iFile)Close #iFile strList = Split(strEntireFile, "[Section1]" & vbCrLf)(1)strList = Split(strList, vbCrLf & vbCrLf)(0) For X = 0 To UBound(strList)List1.AddItem strList(X), 0Next End Sub
Here is the contents of the .ini
This returns the 3 "test" lines like it should, but I need to get them in the list box.
Compile Error "=" Expected. Public Sub In A Class
i have a class clsGlobalOptions with a public sub
Public Sub LoadFromFile(Optional ByVal FilePath As String = "none") If FilePath = "none" Then Open App.Path + "options.txt" For Input As #1 Else Open FilePath For Input As #1 End If Dim StrBuff As String Dim i As Integer i = 0 While (Not EOF(1)) Line Input #1, StrBuff MsgBox (StrBuff) Loop Close #1 End Sub
but when i try to use it like
i get a compile error "=" expected
where am i going wrong?
Error 430 - Class Does Not Support Automation Or Does Not Support Expected Interface
I have used the Package Deployment to create the cab file & installed it on client pcs, but when the exe is run on NON-Development pcs then
I keep getting this Error 430:
Class does not support Automation or does not Support expected interface
I have a class & all I do is create an object of that class in my submain()
But after troubleshooting here is where the problem lies i think:
Code Below for SubMain()
Set objPath = New Scripting.FileSystemObject
Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset
' The following code will search for the DB if it has been
' moved or if the DB is not found in the current dir the
' very first time the app is run on a users pc
strDBPath = frmDBLoc.PathFilename
If Len(strDBPath) = 0 Then
strDBPath = PathSlash(App.Path) & "Wings DB.MDB"
If Not objPath.FileExists(strDBPath) Then
frmDBLoc.Setup vbModal, strDBPath
If frmDBLoc.Cancel Then
I put a messagebox after this piece of code & on the client pcs that messagebox never showed so its somewhere in here the problem is....I hope the right files are being distributed with the Package Deployment wizard cause it really doesnt give u a choice to select a diff version of a file....
VB Error 403 - Class Does Not Support Automation Or Does Not Support Expected Interface
I am developing a VB COM object, which will be activated from a server via ASP.
When I test my COM object (which is registered as COM+) on my local IIS server, the object functions perfectly. But when I installed the same object on a real web server in our company, the object fails and returns the VB error no. 430.
The strange thing is that some of the methods are actually functioning and some don't.
I can't seem to understand the reason for thier failure.
Thanx a lot,
Error "External Table Isn't In The Expected Format"
I would like to use file .dbf whit an object Data. Is it possible to use table .dbf only. Now I use this but my table .dbf is all the time associate with one table .dbt (???). Do you know why? When I try to load table .dbf alone am not able. I receive this error "External table isn't in the expected format".
And when I use the table .dbf am not able to apply this method "FindFirst" but am able whit table .mdb
Finaly how can I use a table .dbf whit Data control.
Sorry for my english