Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using Cell Ranges


Hi,

I have a macro that navigates a website and imputs the date.
I have tried to link it to the information in a cell but it does not
work can someone help please below is my code!!


Code:
--------------------
Sub HiltonBracknell()



Dim ie As Object


Set objWSS = CreateObject("WScript.Shell")
Set ie = CreateObject("InternetExplorer.Application")

With ie
.Visible = True
.navigate "https://www.hilton.co.uk/Reservation/300_CheckAvailability.jsp?hid=11001804"
Do While busy: DoEvents: Loop
Do While .ReadyState < 4: DoEvents: Loop
With document.Forms("checkavailabilityform")
.day1.Value = Worksheets("setup").Range("C59")
.monthYear1.Value = Worksheets("setup").Range("C60")
.day2.Value = Worksheets("setup").Range("C61")
.monthyear2.Value = Worksheets("setup").Range("C62")
.submit

End With
--------------------


--
gunny1979
------------------------------------------------------------------------
gunny1979's Profile: http://www.excelforum.com/member.php...o&userid=32932
View this thread: http://www.excelforum.com/showthread...hreadid=529312

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Using Cell Ranges

Hi,

What I can say about your code is:

Write ".Busy" instead of "busy"
Write ".document", instead of "document"
Write the month as "200605" rather than "May 2006"

With these changes it worked for me ...

Hope this helps

"gunny1979" написа:


Hi,

I have a macro that navigates a website and imputs the date.
I have tried to link it to the information in a cell but it does not
work can someone help please below is my code!!


Code:
--------------------
Sub HiltonBracknell()



Dim ie As Object


Set objWSS = CreateObject("WScript.Shell")
Set ie = CreateObject("InternetExplorer.Application")

With ie
.Visible = True
.navigate "https://www.hilton.co.uk/Reservation/300_CheckAvailability.jsp?hid=11001804"
Do While busy: DoEvents: Loop
Do While .ReadyState < 4: DoEvents: Loop
With document.Forms("checkavailabilityform")
.day1.Value = Worksheets("setup").Range("C59")
.monthYear1.Value = Worksheets("setup").Range("C60")
.day2.Value = Worksheets("setup").Range("C61")
.monthyear2.Value = Worksheets("setup").Range("C62")
.submit

End With
--------------------


--
gunny1979
------------------------------------------------------------------------
gunny1979's Profile: http://www.excelforum.com/member.php...o&userid=32932
View this thread: http://www.excelforum.com/showthread...hreadid=529312


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 to specify cell ranges dynamically? Agent Wild Excel Worksheet Functions 5 June 7th 06 10:37 AM
Cell Variables and Ranges jcottam Excel Discussion (Misc queries) 2 March 31st 06 07:33 PM
Cell ranges ATK Excel Discussion (Misc queries) 1 January 27th 06 08:50 AM
Named Cell Ranges Blackcat Excel Discussion (Misc queries) 1 December 9th 04 09:57 AM
Specifying ranges relative to a cell Harlan Messinger[_2_] Excel Programming 8 May 21st 04 04:59 PM


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

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

About Us

"It's about Microsoft Excel"