Results 1 to 24 of 24

Thread: Need a little help easy probably..

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2006
    Posts
    57

    Need a little help easy probably..

    Ok Im playing around with excel.. and

    in vb I have
    VB Code:
    1. 'more code.. above this
    2.  
    3. If Range("U2") = "" Then GoTo Line1 Else
    4.     With ActiveSheet.QueryTables.Add(Connection:="URL;[""item""]", Destination:=dest)
    5.         .RefreshStyle = xlOverwriteCells
    6.  
    7.         .AdjustColumnWidth = False
    8.        
    9.     With ActiveSheet.QueryTables(1).Parameters(1)
    10.     .SetParam xlRange, Range("U2")
    11.     End With
    12.         .BackgroundQuery = True
    13.         .Refresh
    14.     End With
    15.  
    16. 'more code below.

    Now the code above is to grab a full http address from each cell one at a time and return in my excel page.. this works if I were to.. make the cells single digits like..
    http://www.example.com/testpg?tp=1&lala=12
    http://www.example.com/testpg?tp=2&lala=12
    http://www.example.com/testpg?tp=3&lala=12

    If I were to only use 1, 2, 3 for the [""item''] part..

    like so..
    VB Code:
    1. With ActiveSheet.QueryTables.Add(Connection:="URL;[url]http://www.example.com/testpg?tp=[/url][""item""]&lala=12", Destination:=dest)

    It works fine..

    But if I use the [""item'''] part to grab the cell with the entire...
    http://www.example.com/testpg?tp=1&lala=12

    it doesnt work.. and I've checked the http: url link after its tried and what it does is turns my url into this...

    http://www.example.com/testpg?tp%3D1%26lala%3D12

    causing it to not find the correct URL.

    My quest is why does it turn ='s signs into %3D and & signs into %26

    and how do I prevent it from doing this?

    Thanks much apprieciated!!!!!!!!!!!!!

    ( I posted this elsewhere once and found a note to post it in the classic section.. sorry guys new as of today)

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Need a little help easy probably..

    It changes them to make them compatible with the HTTP protocol since you are using web links.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Member
    Join Date
    Nov 2006
    Posts
    57

    Re: Need a little help easy probably..

    hmm.. so the site im trying to query doesnt like the %3D and the %26 in the url does that mean Im SOL?

  4. #4
    PowerPoster
    Join Date
    May 2006
    Location
    Location, location!
    Posts
    2,673

    Re: Need a little help easy probably..

    Just use a replace to replace %3D with the = and the %26 with the &...you might find a few others too, like ? (can't remember what the number is for it though...I think it's actually the ASCII code but can't be sure)
    Well, everyone else has been doing it :-)
    Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
    Expect more to come in future
    If I have helped you, RATE ME! :-)

    I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!

    And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.

  5. #5

    Thread Starter
    Member
    Join Date
    Nov 2006
    Posts
    57

    Re: Need a little help easy probably..

    Smux Im completely new to VB

    I know asp php cgi etc etc...

    What do you mean exactly use a replace?

    the site uses

    http://www.examplesite.com/sample.php?id=1&eg=two

    runs that look fine..
    but doesnt like when my vb converts it too
    http://www.examplesite.com/sample.php?id%3D1%26eg%3Dtwo

    and honestly I have no idea why VB seems to change it anyhow.

    So whats the "replace" your talking about.

    Thanks for any help!!

    ----------- SECONDS LATER...

    I see I just searched VB and replace...
    http://www.w3schools.com/vbscript/func_replace.asp

    so your talking the replace function..
    ok..

    So where would it go??

    VB Code:
    1. If Range("U2") = "" Then GoTo Line1 Else
    2.  
    3. ' would the replace function go here?? in the line below or can it go anywhere sorry guys I know how people react to complete newbies. lol
    4.     With ActiveSheet.QueryTables.Add(Connection:="URL;[""item""]", Destination:=dest)
    5.         .RefreshStyle = xlOverwriteCells
    6.  
    7.         .AdjustColumnWidth = False
    8.        
    9.     With ActiveSheet.QueryTables(1).Parameters(1)
    10.     .SetParam xlRange, Range("U2")
    11.     End With
    12.         .BackgroundQuery = True
    13.         .Refresh
    14.     End With
    Last edited by 0o0o0; Nov 14th, 2006 at 07:19 PM.

  6. #6
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Need a little help easy probably..

    Are you doing from within Excel?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  7. #7

    Thread Starter
    Member
    Join Date
    Nov 2006
    Posts
    57

    Re: Need a little help easy probably..

    yes excel and Microsoft Visual Basic 6.0 so it says.

  8. #8
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Need a little help easy probably..

    If it is then it should be two completely separate programs. If you access the vb part by starting Excel first and opening the VBA IDE then its only Excel and VBA.

    Going by your code so far it looks like VBA.

    Whats the value inside of dest?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  9. #9

    Thread Starter
    Member
    Join Date
    Nov 2006
    Posts
    57

    Re: Need a little help easy probably..

    you mean the link? the Url ?

    http://www.wagerline.com/Handicappin...rtid=1&picks=1

    I need the = and the & to be as they are..
    cept my vb code or something for some reason turns it into..

    ='s sign being %3D and & sign bring %26

    so ive been told to use the replace function..

    all I looking for is where would you place the replace function.. in the line?

    or at the start of the code?

    actually heres my whole code.. lemme know where the replace should go thanks.

    VB Code:
    1. Sub stuff_Lookup()
    2. 'clear previous data
    3.     Sheets("Sheet1").Select
    4.     Range("A300:G472").Select
    5.     Application.CutCopyMode = False
    6.     Selection.ClearContents
    7.     Range("U2").Select
    8. ' dont laugh but this is my complete total guess on where to put the replace function????????
    9.     Item = Replace(Item, "%26", "&")
    10.  
    11.  
    12.    
    13. 'Begin the query
    14.     Set dest = Range("A300:G472")
    15.     For Each cell In [A1:A2]
    16.         cell.Select
    17.         Range("U2").Value = cell.Value
    18.        
    19.        
    20.        
    21.        
    22.        
    23.        
    24. 'Check for end of WTN list
    25.         If Range("U2") = "" Then GoTo Line1 Else
    26.     With ActiveSheet.QueryTables.Add(Connection:="URL;[""item""]", Destination:=dest)
    27.         .RefreshStyle = xlOverwriteCells
    28.  
    29.         .AdjustColumnWidth = False
    30.        
    31.     With ActiveSheet.QueryTables(1).Parameters(1)
    32.     .SetParam xlRange, Range("U2")
    33.     End With
    34.         .BackgroundQuery = True
    35.         .Refresh
    36.     End With
    37. Line1:
    38.     Range("U2").Select
    39.     Set dest = dest.Offset(35, 0)
    40.     Next cell
    41. End Sub

    so you would see in SHEET1 cell A1

    http://www.wagerline.com/Handicappin...rtid=1&picks=1

    then in SHEET 1 cell A2

    http://www.wagerline.com/Handicappin...rtid=2&picks=1

    and in sheet1 cell A3 etc etc etc...

    http://www.wagerline.com/Handicappin...rtid=3&picks=1

    I know I could make like http://www.wagerline.com/Handicappin....aspx?sportid=[""blabla""]&picks=[""blablainfo2""]

    but I just want it to pick off the pages in the A column.. one by one.

    it grabs em.. and posts them below on the page.. then runs to the next grabs it and posts it underneath etc etc...

    I use it before a series of games are about to start.. but this way I see all the pages at once.. not having to flip page after page..

    I also have a ton of excel formulas which auto calculate the hundreds of results instantaniously..

    I know I know ... not a rocket science topic but .. its a helper for past time sunday afternoon hobby, lying on a couch and watching a game or two... lol

  10. #10
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Need a little help easy probably..

    Isnt "item" no longer a variable as its enclosed in double quotes?
    Also, Item is a keyword for collections and would be better in the long run to avoid using.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  11. #11

    Thread Starter
    Member
    Join Date
    Nov 2006
    Posts
    57

    Re: Need a little help easy probably..

    yep see I actually foudn the code on another site it suited my purpose for the past couple months... but now I know how cool vb Could be.. its like your always looking for or finding more "automation" lol..

    so more or less once I figure this wildcard = %3D and & %26 thing out.. all i'll have to do is open the program and it auto downloads like 300 pages without me having to touch a thing.. and possibly after that it could be programmed to even save the file and do the process everyday.. hands free..

    So yes and no I kinda have an idea how it all works but dont lol.

    so whats my remedy for the replace %3D with = and %26 with &

    any ideas? or are ya just toying with me like a cat with a semi dead mouse lol.
    Anticipation is killing me on the answer.

    .. oh wait I know what your waiting for.. Ok yes you are the VB GOD. hows that?

  12. #12
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Need a little help easy probably..

    I dont believe that "item" is the actual value as it needs to be passed like so.
    VB Code:
    1. With ActiveSheet.QueryTables.Add(Connection:="URL;[" & Chr(34) & Item & Chr(34) & "]", Destination:=dest)
    Last edited by RobDog888; Nov 15th, 2006 at 02:44 AM.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  13. #13
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Need a little help easy probably..

    If you record a macro creating the webquery you can see how to set all its properties correctly. No need to worry about replaced characters either.

    VB Code:
    1. With ActiveSheet.QueryTables.Add(Connection:= _
    2.     "URL;http://www.wagerline.com/Handicapping/topHandicappers.aspx?sportid=1&picks=1" _
    3.     , Destination:=Range("A300:G472"))
    4.     .Name = "0o0o0"
    5.     .FieldNames = True
    6.     .RowNumbers = False
    7.     .FillAdjacentFormulas = False
    8.     .PreserveFormatting = False
    9.     .RefreshOnFileOpen = False
    10.     .BackgroundQuery = True
    11.     .RefreshStyle = xlInsertDeleteCells
    12.     .SavePassword = False
    13.     .SaveData = True
    14.     .AdjustColumnWidth = True
    15.     .RefreshPeriod = 0
    16.     .WebSelectionType = xlEntirePage
    17.     .WebFormatting = xlWebFormattingAll
    18.     .WebPreFormattedTextToColumns = True
    19.     .WebConsecutiveDelimitersAsOne = True
    20.     .WebSingleBlockTextImport = False
    21.     .WebDisableDateRecognition = False
    22.     .WebDisableRedirections = False
    23.     .Refresh BackgroundQuery:= True
    24. End With
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  14. #14

    Thread Starter
    Member
    Join Date
    Nov 2006
    Posts
    57

    Re: Need a little help easy probably..

    Actually I found it...

    the code that i found, where I originally stared all this..


    http://www.business-spreadsheets.com/forum.asp?t=57



    But now what Im trying to do is.. instead of having.. like his example...

    http://www.stuff.com/support/api/stuff.cgi?item=[""item""]",

    and posting names of the items in
    For Each cell In [G14:G64]

    I would rather have the entire
    http://www.stuff.com/support/api/stuff.cgi?item=1
    http://www.stuff.com/support/api/stuff.cgi?item=2
    http://www.stuff.com/support/api/stuff.cgi?item=3
    http://www.stuff.com/support/api/stuff.cgi?item=4
    http://www.stuff.com/support/api/stuff.cgi?item=5
    and so on ..
    in the the cells G14:G64

    but thats where this code turns a regular URL into a friggen %3D and %26 bs..

    why!!!!!!!!!!

    just wanna know whats happening and why cant it take a whole address.

    here instead of going to that page I'll bring the code here. Not my code but the guys example.

    VB Code:
    1. Sub stuff_Lookup()
    2. 'clear previous data
    3.     Sheets("Scrubber").Select
    4.     Range("I14:S100").Select
    5.     Application.CutCopyMode = False
    6.     Selection.ClearContents
    7.     Range("A9").Select
    8. 'Begin the query
    9.     Set dest = Range("I14")
    10.     For Each cell In [G14:G64]
    11.         cell.Select
    12.         Range("A9").Value = cell.Value
    13. 'Check for end of WTN list
    14.         If Range("A9") = "" Then GoTo Line1 Else
    15.     With ActiveSheet.QueryTables.Add(Connection:="URL;[url]http://www.stuff.com/support/api/stuff.cgi?item=[/url][""item""]", Destination:=dest)
    16.         .RefreshStyle = xlOverwriteCells
    17.         .WebFormatting = xlWebFormattingNone
    18.         .AdjustColumnWidth = False
    19.         .PreserveFormatting = True
    20.     With ActiveSheet.QueryTables(1).Parameters(1)
    21.     .SetParam xlRange, Range("A9")
    22.     End With
    23.         .BackgroundQuery = True
    24.         .Refresh
    25.     End With
    26. Line1:
    27.     Range("A1").Select
    28.     Set dest = dest.Offset(1, 0)
    29.     Next cell
    30. End Sub

    try it.. you'll see how it works.. But i need the whole http://address'es in cells G15 :G64

    why? cause I have more varibles than this guy used in the urls..
    besides item=
    .. I have

    Sport= and Game Number = and id =


    am I really SOL on this one .. trying to use this script


    Thanks to anyone who can give a fix.. so i dont get %3D instead of = and %26 instead of & using the whole http://urls in the cells.

    Last edited by 0o0o0; Nov 15th, 2006 at 04:36 AM.

  15. #15
    New Member
    Join Date
    Nov 2006
    Posts
    11

    Re: Need a little help easy probably..

    Does nobody use If functions??? if you used the If function in place of some other more complex functions, you would be able to understand the code better

  16. #16

    Thread Starter
    Member
    Join Date
    Nov 2006
    Posts
    57

    Re: Need a little help easy probably..

    "Does nobody use If functions??? if you used the If function in place of some other more complex functions, you would be able to understand the code better"
    Shoot! any suggestions... IF sounds great what do i need to do??


    ....Well Im burnt out..

    Anyone ever use a script, know of a script or thought of a script that will

    take a list of Urls in an Excel Page.. say cells A1 to A300.. so 300 urls..

    Run through each url and pull the page into the same or a second excel page??

    Just that simple.. but seems to be a Hugely impossible task.

    just simply said 300 web Queries from a list of 300 urls in the A column in excel..

    and pulls em in on the same page down below .. or on a second page.

    Anyone?

    lol damn thats a full 13 hours in this chair trying to get it to work.
    check my first post time above. Im completely stoked.

    ( ya ya I could do 300 manually entered.. but the links and url change each day)
    Last edited by 0o0o0; Nov 15th, 2006 at 06:23 AM.

  17. #17
    PowerPoster
    Join Date
    May 2006
    Location
    Location, location!
    Posts
    2,673

    Re: Need a little help easy probably..

    It sounds to me like you're messing about with other people's code with no real knowledge of how they work, and you should be prepared for failure if this is the case because no matter how much help we give (short of actually writing the damn thing for you, which we won't do unless we're *really* bored or *really* helpful :-)) you'll still not have a working program unless you're the luckiest person in the world.

    If the program is VBA and is running as part of Excel, this isn't the right place to be asking questions about VBA...but if you are running VB6, then this is the right place :-)

    replace is a simple function...imagine the string "ABXDEF"...If you did newstring = replace("ABXDEF","X","C") it would put "ABCDEF" into the variable newstring. In much the same way you would use replace("http://www.someurl.com?what%3Dthis%26who%3Ddat","%3D","=") to get "http://www.someurl.com?what=this&who=dat" (don't forget you'd need 2 replaces, one for = and one for & ...I've only listed one above)

    replace can work with a string both as input or output, so you don't have to put the data in each time :-)
    Well, everyone else has been doing it :-)
    Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
    Expect more to come in future
    If I have helped you, RATE ME! :-)

    I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!

    And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.

  18. #18
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Need a little help easy probably..

    Again, read post 12 and 13. Everything worked fine for me when its formatted correctly without the ""item"" part as its not valid.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  19. #19

    Thread Starter
    Member
    Join Date
    Nov 2006
    Posts
    57

    Re: Need a little help easy probably..

    ok.. I feel like an imigrant here..

    Where does the replace line go?

    also..

    say I want

    newstring = replace("what goes in here if the cell value url changes","%26","&")

    Or
    would..

    newstring = replace("%26","%26","&")
    work?

    Also.. the Btch doesnt like % signs.

    Is the replace line universal for any url it uses?? or do I have to add a varible or "newstring" into the Connection:="URL;

    Thats it thats all my last question..

    is this really spoon feeding? just two simple tips. I dont need code written for me.. just read back my posts.. smux answered first question..
    I need to use replace.

    my second question where would it go?

    thats it.

    I read elsewhere on the forum guys who are running there houses with vba code.. lol Im just finding very hard to believe I cant get out two straight answers.. only one.

    And dude showing me alternative ways above and not just simply answering my two questions.. lol its nuts.

    k guys no disrespect at all. Just give me the answer to the second question and im good. And wont need VBA forums anymore. I just came for a simple question how to change the %3D and %26 back to a regular URL.

    thanks tho guys much apprieciated.
    Last edited by 0o0o0; Nov 15th, 2006 at 02:27 PM.

  20. #20
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Need a little help easy probably..

    No, any level of questions are al valid and acceptable on VBF.

    Yes, the code on #13 does only one but like I was mentioning, if you recorda macro of you creating the webquery the way you want you can generate the code that will load all 300+ records. Working with this other code is a bit much to try to completely fix as shown by the minimal code needed for just one record.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  21. #21

    Thread Starter
    Member
    Join Date
    Nov 2006
    Posts
    57

    Re: Need a little help easy probably..

    ok then moving down that avenue.. does a macro record...

    copy pasting the contents of cell A2 into the
    "URL;http://www.wagerline.com/Handicapping/topHandicappers.aspx?sportid=1&picks=1" _
    , Destination:=Range("A300:G472"))

    line and then A3 and copy pasting that into the

    "URL;http://www.wagerline.com/Handicapping/topHandicappers.aspx?sportid=1&picks=1" _
    , Destination:=Range("A300:G472"))

    etc etc???

    will a recording a macro record in excel and also vba?

    the example you gave lol is so basic Ive done tha a million times I just wasnt banking on rewriting the whole thing over. Just needed to change %3D and %26

    ok guys im gettin nowhere here. just Consuming alot of forum space.

    Thanks for all your suggestions....... or replies.

  22. #22
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Need a little help easy probably..

    See the problem for me, at least, is that I dont get the changing characters. Macro recording copies most GUI actions including copy/paste. Not sure what you mean by recording VBA?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  23. #23

    Thread Starter
    Member
    Join Date
    Nov 2006
    Posts
    57

    Re: Need a little help easy probably..

    recieve thy answers you shall not.
    Thanks yoda.

  24. #24

    Thread Starter
    Member
    Join Date
    Nov 2006
    Posts
    57

    Re: Need a little help easy probably..

    Static sends me the answer by email.

    a whopping total of 25 charactors.

    Fixed simple. No answering questions with questions, no hassle.

    you guys are brutal.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width