Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ShellExecute Question

Status
Not open for further replies.

Igawa29

MIS
Jan 28, 2010
99
US
I am trying to figure out the code to do a IF/Then statement using ShellExecute.

I want to say something like this:

Code:
If Me.linkbox.value = "001" then
shellexecute (C:\desktop\001.png)
end if

If Me.linkbox.value = "002" then
shellexecute (C:\desktop\002.png)
end if

 


hi,

or...
Code:
dim sFName as string

sFName = "C:\desktop\" & Me.linkbox.value & ".png"
shellexecute (sFName)


Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
I am getting ShellExecute sub or function not defined.
 


I did not even look at your syntax.

Check VBA HELP on Shell
Code:
shell (sFName)


Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top