Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Compile Error Argument Not optional

Hey hears the code and the message i get with it is Compile Error
Argument not opional

Private Function LoadSurface(ByVal filename As String) As
Direct3DSurface8
On Local Error GoTo fatal_error
Dim surf As Direct3DSurface8

'return error by dfault
Set LoadSurface = Nothing

'creat the new surface
Set surf = d3ddev.CreateImageSurface(SCREENWIDTH, SCREENHEIGHT,
dispmode.Format)
If surf Is Nothing Then
MsgBox "Error creating surface!"
Exit Function
End If

'load surface from file
d3dx.LoadSurfaceFromFile _ (.LoadSurfaceFromFile_ Is where it is
hilighted )
surf , _
ByVal 0, _
ByVal 0, _
filename, _
D3DX_DEFAULT, _
0, _
ByVal 0

If surf Is Nothing Then
MsgBox "Error loading " & filename & "!"
Exit Function
End If

'return the new surface
Set LoadSurfacce = surf

fatal_error:
Exit Function
End Function

Anything ELSE WRONG with this code please tell.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Compile Error Argument Not optional

Bit of a guess but

d3dx.LoadSurfaceFromFile _
surf , _
0, _
0, _
filename, _
D3DX_DEFAULT, _
0, _
0

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

wrote in message
ups.com...
Hey hears the code and the message i get with it is Compile Error
Argument not opional

Private Function LoadSurface(ByVal filename As String) As
Direct3DSurface8
On Local Error GoTo fatal_error
Dim surf As Direct3DSurface8

'return error by dfault
Set LoadSurface = Nothing

'creat the new surface
Set surf = d3ddev.CreateImageSurface(SCREENWIDTH, SCREENHEIGHT,
dispmode.Format)
If surf Is Nothing Then
MsgBox "Error creating surface!"
Exit Function
End If

'load surface from file
d3dx.LoadSurfaceFromFile _ (.LoadSurfaceFromFile_ Is where it is
hilighted )
surf , _
ByVal 0, _
ByVal 0, _
filename, _
D3DX_DEFAULT, _
0, _
ByVal 0

If surf Is Nothing Then
MsgBox "Error loading " & filename & "!"
Exit Function
End If

'return the new surface
Set LoadSurfacce = surf

fatal_error:
Exit Function
End Function

Anything ELSE WRONG with this code please tell.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I automatically compile totals from 12 worksheets into 1? PippyKat Excel Worksheet Functions 2 June 23rd 06 02:39 PM
format optional parameter compound Excel Worksheet Functions 0 September 26th 05 10:55 PM
format optional parameter compound Excel Discussion (Misc queries) 0 September 16th 05 06:20 PM
Compile error in hidden module arjay Excel Discussion (Misc queries) 5 September 16th 05 12:47 AM
Odd behavior on margin change John Charts and Charting in Excel 2 June 20th 05 02:03 PM


All times are GMT +1. The time now is 08:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"