CreateObject ShellExecute Wscript

A

a

Dear Friends:

I'm still searching the web I have find this 3 commands or function

ShellExecute

Open any application

CreateObject

Creating object to run

Wscript

I don't know what is used for



What I want :

I want to use shellexcute to run IE because shellexcute open the application
one time (no more)

{{{{This is what I want }}}}

=============================

Create object

Is run application but when using it you will open the application many
times



Dear friends:

I find this code



Command_1_click

Dim ie As Object

Set ie = CreateObject("internetexplorer.application")

ie.Visible = True

With ie

.Navigate "https://www.google.com"

.Top = 0

.Left = 0

End With

Set ie = Nothing

End sub



What is problem of the above code

The problem is evry time you press the command button the IE is open (this
not what I want)



Next code

Private 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





Private Sub Command0_Click()

ShellExecute 0, "open", "http://www.google.com", 0, 0, 1

End Sub

The above code is what I want (open the page one time) I want to deal from
access 2003 by code with one page (for editing) for special purpose

Ok

What is the problem of the above code

Problem is:

I can't:

Setting the properties of the IE

Like this next example

With ie

.Top = 0

.Left = 0

End With



What I want from you >>>>>>>>can You merge this 3 command to produce this
command:

The command I want is arranged like this:

1- open explorer from (access 20003

2- setting the properties of IE.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top