#7 Basic Syntax Error

open
nobody
Calc (6)
5
2007-07-21
2007-07-21
Anonymous
No

I just tried to open a Microsoft Excel Sheet loaded with Macros using Oxygen Office 2.2, i get the following error

Basic Syntax Error.
Symbol Expected.

Any ideas how to fix this???

Thanks

Discussion

  • Kami

    Kami - 2007-07-21

    Logged In: YES
    user_id=965597
    Originator: NO

    The VBA capabilities are under testing. You can send me that sheet for more precise testing. Also Noel Power might be interested about it:
    noel.power at novell.com

     
  • Kami

    Kami - 2007-10-16

    Logged In: YES
    user_id=965597
    Originator: NO

    Can you try the latest version?

     
  • Paulio

    Paulio - 2008-02-12

    Logged In: YES
    user_id=1846657
    Originator: NO

    Hi Kami, I have the latest version but I still get this error.. Any ideas?

     
  • Kami

    Kami - 2008-02-12

    Logged In: YES
    user_id=965597
    Originator: NO

    Where does it drop the error? Can you attach the VBA script?

     
  • Paulio

    Paulio - 2008-02-12

    Logged In: YES
    user_id=1846657
    Originator: NO

    Hi Again Kami,

    Yea I have a few examples of code where I get the error. (not sure how to add the code best.

    Function TextNoSpaces(text As String) As String
    Dim i As Integer, J As Integer, s2 As String
    If Len(text) > 0 Then 'even: return 0 if valid
    J = 0
    For i = 1 To Len(text) 'strip spaces
    If Mid(text, i, 1) <> " " Then
    s2 = s2 & Mid(text, i, 1)
    End If
    Next i
    End If
    TextNoSpaces = s2
    End Function

    Public Function SaveToFile(sFilename As String, sResult As String) As Boolean
    Dim lPosn As Long, lStart As Long
    ' ******************************************************
    ' Kill (sFilename)
    ' Application.Wait (Now + TimeValue("0:00:02"))
    ' ******************************************************
    Close 14
    Open sFilename For Binary As #14
    Put #14, , sResult
    Close 14
    SaveToFile = True
    End Function

    Option Explicit
    Option Compare Text

    'use PCT/SSL if applicable (HTTP)
    Public Const INTERNET_FLAG_SECURE = &H800000
    Public Const INTERNET_OPEN_TYPE_PRECONFIG = 0
    Public Const INTERNET_OPEN_TYPE_PROXY = 3
    Public Const INTERNET_INVALID_PORT_NUMBER = 0
    Public Const INTERNET_SERVICE_HTTP = 3
    Public Const INTERNET_DEFAULT_HTTPS_PORT = 443
    Public Const INTERNET_FLAG_KEEP_CONNECTION = &H400000
    Public Const RESPONSE_LENGTH = 1024
    ' FTP constants
    Public Const FTP_TRANSFER_TYPE_ASCII = &H1
    Public Const FTP_TRANSFER_TYPE_BINARY = &H2
    Public Const INTERNET_DEFAULT_FTP_PORT = 21
    Public Const INTERNET_SERVICE_FTP = 1
    Public Const INTERNET_FLAG_RELOAD = &H80000000
    ' Timeouts (apparently only recieve works) Matt
    Public Const INTERNET_OPTION_CONNECT_TIMEOUT = 120
    Public Const INTERNET_OPTION_RECEIVE_TIMEOUT = 120
    Public Const INTERNET_OPTION_SEND_TIMEOUT = 120

    Public Declare Function InternetOpen Lib "wininet.dll" Alias _
    "InternetOpenA" (ByVal sAgent As String, _
    ByVal lAccessType As Long, ByVal sProxyName As String, _
    ByVal sProxyBypass As String, ByVal lFlags As Long) As Long

    Public Declare Function InternetReadFile Lib "wininet.dll" _
    (ByVal hFile As Long, ByVal sBuffer As String, ByVal lNumBytesToRead As Long, _
    lNumberOfBytesRead As Long) As Integer

    Public Declare Function HttpSendRequest Lib "wininet.dll" Alias "HttpSendRequestA" _
    (ByVal hHttpRequest As Long, ByVal sHeaders As String, ByVal lHeadersLength As Long, _
    ByVal sOptional As String, ByVal lOptionalLength As Long) As Integer

    Public Declare Function InternetConnect Lib "wininet.dll" Alias "InternetConnectA" _
    (ByVal hInternetSession As Long, ByVal sServerName As String, ByVal nServerPort As Integer, _
    ByVal sUsername As String, ByVal sPassword As String, ByVal lService As Long, _
    ByVal lFlags As Long, ByVal lContext As Long) As Long

    Public Declare Function HttpOpenRequest Lib "wininet.dll" Alias "HttpOpenRequestA" _
    (ByVal hHttpSession As Long, ByVal sVerb As String, ByVal sObjectName As String, ByVal sVersion As String, _
    ByVal sReferer As String, ByVal something As Long, ByVal lFlags As Long, ByVal lContext As Long) As Long

    Public Declare Function InternetCloseHandle Lib "wininet.dll" _
    (ByVal hInet As Long) As Integer

    Public Declare Function FtpGetFile Lib "wininet.dll" Alias "FtpGetFileA" _
    (ByVal hFtpSession As Long, ByVal sRemoteFile As String, ByVal sNewFile As String, _
    ByVal fFailIfExists As Boolean, ByVal lFlagsAndAttributes As Long, ByVal lFlags As Long, _
    ByVal lContext As Long) As Boolean

    Public Declare Function InternetGetCookie Lib "wininet.dll" Alias "InternetGetCookieA" _
    (ByVal lpszUrlName As String, ByVal lpszCookieName As String, _
    ByVal lpszCookieData As String, lpdwSize As Long) As Boolean

    Public plHandle As Long
    Public plConnection As Long
    Public plRequest As Long

    Public psServerName As String

    Public Function Connect(ServerName As String) As Boolean
    Dim lHandle As Long
    Dim lConnection As String

    Dim sAgent As String

    sAgent = "Excel Orderform"

    'Get Handle to Internet Gateway
    lHandle = InternetOpen(sAgent, INTERNET_OPEN_TYPE_PRECONFIG, "", "", 0)

    If lHandle <> 0 Then
    plHandle = lHandle
    Else
    Exit Function
    End If

    'Connect to server
    If Range("AD3") = "Internal Use" Then
    lConnection = InternetConnect(plHandle, ServerName, INTERNET_INVALID_PORT_NUMBER, "", "", INTERNET_SERVICE_HTTP, 0, 0)
    Else
    lConnection = InternetConnect(plHandle, ServerName, INTERNET_DEFAULT_HTTPS_PORT, "", "", INTERNET_SERVICE_HTTP, 0, 0) ' *HTTPS*
    End If
    If lConnection <> 0 Then
    plConnection = lConnection
    Connect = True
    Else
    Connect = False
    Disconnect
    End If
    End Function

    Public Sub Disconnect()
    'Clean Up
    On Error Resume Next
    InternetCloseHandle plRequest
    InternetCloseHandle plConnection
    InternetCloseHandle plHandle
    End Sub

     
  • Kami

    Kami - 2008-05-07

    Logged In: YES
    user_id=965597
    Originator: NO

    Is this problem was eliminated in the latest release?

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks