Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Activating mozilla firefox and entering an address

what i want to to do is open and activate my firefox browser from excel, then
go to a website, select everything that is on the webpage and copy it to the
clipboard. the only way i can think to do this is using sendkeys. i am new to
VBA please help in laymans terms. the code i have so far, which does not
really work at all, is:

Sub SendKeysApp()

Dim Browser As Variant

Browser = Shell("C:\Program Files\Mozilla Firefox\firefox.exe", 1)
Application.Wait Now() + "00:00:02"
AppActivate Browser
SendKeys "^(F)", True
' supposed to activate the location bar but does not work either

End Sub

btw when i try to run this it says something is wrong with the
Application.Wait line: type mismatch?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Activating mozilla firefox and entering an address

hi
the application.wait part has a format mismatch. the format for now() and
the + part are different and i think that is were you are getting the error
so the solutions is to get the time all in the same format.
from excel help.....
newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 5
waitTime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waitTime

as to the send keys, i am very inexperieced on that. don't use them. sorry.

Regards
FSt1

"Geoff ML" wrote:

what i want to to do is open and activate my firefox browser from excel, then
go to a website, select everything that is on the webpage and copy it to the
clipboard. the only way i can think to do this is using sendkeys. i am new to
VBA please help in laymans terms. the code i have so far, which does not
really work at all, is:

Sub SendKeysApp()

Dim Browser As Variant

Browser = Shell("C:\Program Files\Mozilla Firefox\firefox.exe", 1)
Application.Wait Now() + "00:00:02"
AppActivate Browser
SendKeys "^(F)", True
' supposed to activate the location bar but does not work either

End Sub

btw when i try to run this it says something is wrong with the
Application.Wait line: type mismatch?

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
Entering a mac address in a cell richdsn2 Excel Discussion (Misc queries) 4 April 17th 08 02:57 AM
Entering an address in one cell Putting an Address in a Cell Charts and Charting in Excel 2 October 21st 06 10:20 PM
Using an Excel email hyperlink with Mozilla Thunderbird Dave F. Links and Linking in Excel 0 May 11th 06 09:55 PM
Find next without activating First cell Address Soniya[_4_] Excel Programming 0 November 24th 05 07:27 AM
control mozilla firefox Mark Roth Excel Programming 1 January 28th 05 06:41 AM


All times are GMT +1. The time now is 07:47 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"