#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Have a Big Question

Hello everyone! I have somewhat of a difficult question that I hope somebody
can answer. Here's the problem I'm trying to design a macro that can take
you to a web site and verify weather the site works and that there is also a
certain keyword there also. Now I used a GoToHtml code and it worked it
takes you to that website but that's it what I'm trying to do is to be able
to select mulitple rows and check them all instead of just one. So I'm
asking is this possible to do in VBA and make it a macro or is there a
different way to go about. Thanks to all who reads this and replies.


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 273
Default Have a Big Question

I would try using a web query and bringing the information into excel. Then,
you can run a find feature to search for the information for which you are
looking. Hope this helps!

-Chad

"Art" wrote:

Hello everyone! I have somewhat of a difficult question that I hope somebody
can answer. Here's the problem I'm trying to design a macro that can take
you to a web site and verify weather the site works and that there is also a
certain keyword there also. Now I used a GoToHtml code and it worked it
takes you to that website but that's it what I'm trying to do is to be able
to select mulitple rows and check them all instead of just one. So I'm
asking is this possible to do in VBA and make it a macro or is there a
different way to go about. Thanks to all who reads this and replies.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default Have a Big Question

Yes it si possible:
I think you have imported the WEB page to EXcel and read the sheet row by row.

Here is the code, copy and past it to your VBA.

There is to programes
The first searces the string the other is clearing the strings for blanks.
It si imortent to use cint() for integers and cstr() for strings.

Her is the programs
They are not debugged. TEST __ TEST __ TEST

'Copy your program VBA
'VarIbles
'WWWText=Text from WWW
'Content= 'The text that you serch after
'EXCEL_ROW = ' Row where the string was found
'---------- Functions in your row by row program
Res = FindString(WWWText, Content, EXCEL_ROW)
'if Res =cint(0) then .......... else .........


'---New program --- Function --- FindString and CleanBlank+from strings.

Public Function FindString(WWWText, Content, EXCEL_ROW)
'Clean the strings for "BLANK" positions.
Content = funCleanBlank(Content) ' Function block
WWWText = funCleanBlank(WWWText)
Dim LenContent As Integer
Dim StartPos As Integer
Dim Test As String
StartPos = CInt(0)
LenContent = CInt(Len(LenContent)) 'Number of letters to search.

Do
Test = CStr(Mid(WWWText, StartPos, LenContent))
If CStr(Test) = CStr(Content) Then GoTo StringIsHere
StartPos = StartPos + 1
Loop Until StartPos < CInt(lenContents)

EXCEL_ROW = 0 'If the Content is not fount return a zero.

StringIsHe 'Jumps to this point if found.
FindString = EXCEL_ROW 'Return the row where the Content was found
End Function


Public Function funCleanBlank(Text)
Dim Pos, ASCNum, SumTegn, BlankPos As Long
Dim Tegn, AkkText As String
BlankPos = CLng(InStr(Text, " "))' Important ****************
If CLng(BlankPos) = CLng(0) Then GoTo NoBlanks
If CStr(Text) = CStr(Empty) Or CStr(Tekst) = CStr("") Then GoTo NoBlanks
Pos = CLng(1)
SumTegn = CLng(Len(Text)) + CLng(1)
Do 'Clear blanks
Tegn = Mid(Text, Pos, 1)
ASCNum = Asc(Tegn)

If CLng(ASCNum) < CLng(32) Then AkkTekst = CStr(AkkTekst) + CStr(Tegn)
Pos = CLng(Pos) + CLng(1)
Loop While CLng(SumTegn) CLng(Pos)
GoTo Quit
NoBlanks:
AkkText = Text

Quit:
funReturTXTUtenBlankeTegn = AkkText

End Function

--
Øyvind


"Art" wrote:

Hello everyone! I have somewhat of a difficult question that I hope somebody
can answer. Here's the problem I'm trying to design a macro that can take
you to a web site and verify weather the site works and that there is also a
certain keyword there also. Now I used a GoToHtml code and it worked it
takes you to that website but that's it what I'm trying to do is to be able
to select mulitple rows and check them all instead of just one. So I'm
asking is this possible to do in VBA and make it a macro or is there a
different way to go about. Thanks to all who reads this and replies.



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
Newbie Question - Subtraction Formula Question [email protected] Excel Discussion (Misc queries) 3 May 5th 06 05:50 PM
Question - Help tagr Excel Worksheet Functions 2 March 18th 06 03:58 AM
The question is an excel question that I need to figure out howto do in excel. Terry Excel Worksheet Functions 3 January 23rd 06 06:22 PM
Day Question Robbyn Excel Worksheet Functions 9 August 1st 05 03:54 AM
Another question for Jon Wazooli Charts and Charting in Excel 1 March 26th 05 06:57 AM


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