[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1033
  • Last Modified:

Compile error "Expected: End of Statement"

I pasted the declaration below in a standard module and I am getting a:
Compile Error"
Expected: End of Statement.

Private Type OSVERSIONINFO
  dwOSVersionInfoSize As Long
  dwMajorVersion As Long
  dwMinorVersion As Long
  dwBuildNumber As Long
  dwPlatformId As Long
  szCSDVersion As String * 128
End Type

Private Declare Function GetVersionEx Lib "kernel32.dll" Alias "GetVersionExA" (lpVersionInformation As OSVERSIONINFO) As LongFunction OsVersion() As Single                               '<<<==== Error Line
' ......................................
' ......................................
' *********

How can this line code be resolved?
0
billcute
Asked:
billcute
  • 2
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
Private Type OSVERSIONINFO
  dwOSVersionInfoSize As Long
  dwMajorVersion As Long
  dwMinorVersion As Long
  dwBuildNumber As Long
  dwPlatformId As Long
  szCSDVersion As String * 128
End Type

Private Declare Function GetVersionEx Lib "kernel32.dll" Alias "GetVersionExA" (lpVersionInformation As OSVERSIONINFO) As Long

Public Function  OsVersion() As Single                              
   'code of the function here...
 end Function
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
to explain:
there was a newline missing between the "as long" and the "function" keyword...
0
 
billcuteAuthor Commented:
Angel III:
Thanks for your input, I have two other questions created that are similar to the one you have just resolved. You would find these questions by clicking on my userid. If you could assist, it would be great.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now