Giter Site home page Giter Site logo

Comments (1)

vishalchowdhary avatar vishalchowdhary commented on August 12, 2024

Hi Marc,
I'm not very knowledgable in Excel, but just by looking at the code, it
seems like the following line could cause compile time error due to return
type mismatch:

Dim inst As Long
inst = ShellExecute(0, "open", spec, args, work_dir, 0)

For VBA7, there would be a mismatch between the function return type of
LongPtr vs the variable type Long for inst.

Vishal

On Fri, Oct 26, 2012 at 8:31 AM, Marc Joffe [email protected]:

Can someone knowledgeable in Excel VBA help us out?

Sone users get compile errors on the following block of code in pscf.xla

#If VBA7 Then
Public Declare PtrSafe Function ShellExecute Lib "shell32.dll" Alias
"ShellExecuteA" (ByVal hwnd As LongPtr, ByVal lpOperation As String, ByVal
lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As
String, ByVal nShowCmd As Long) As LongPtr
#Else
Public Declare Function ShellExecute Lib "shell32.dll" Alias
"ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal
lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As
String, ByVal nShowCmd As Long) As Long
#End If

...

On Error GoTo 0
Print #1 #1, "locked"
Close #1 #1
Dim args As String
args = arg1 & " " & arg2 & " " & arg3 & " " & arg4 & " " & arg5 & " " &
arg6 & " " & arg7
Dim inst As Long
inst = ShellExecute(0, "open", spec, args, work_dir, 0)
If inst <= 32 Then
MsgBox work_dir & ", " & spec
End If
On Error GoTo done:

We need to be able to reliably shell out to Windows under both 32 and 64
bit.


Reply to this email directly or view it on GitHubhttps://github.com//issues/13.

from pscf.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.