Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
please pardon my newbishness... this is probably just something extremely
simple, but i've had NO luck finding out how to do this... i've written code basically to have excel log into a website i use for my job and do this and that... but the part where i'm getting stumped is when i have excel use the code: With appIE sURL = "https://www.thewebsiteimaccessing.com/thereportineed" .Navigate sURL call ReadyWait 'waits for page to load .Document.all("firstcriteriafield ").Value = "12" .Document.all("secondcriteriafield").Value = "26" .Document.all("thirdcriteriafield").Value = "8" '****************** 'Here is where I need the correct code to have 'it select multiple options from the criteria listbox '****************** With .Document.all("fourthcriteriafield") .Value = "41" .Value = "177" .value = "178" End With .Document.all("btnRetrieve").Click End With if i've not managed to make my request clear... basically, i'm trying to find the code that will mimic ctrl+click in a multi-select listbox. any help? -- Oh, the creative possibilities! ^_^ |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
HTML select elements (listboxes) have a collection of "option" child
elements. You would select an option by setting its 'selected' attribute to true after checking its "value". With .document.all("fourthcriteriafield") For Each opt In .Options If opt.Value = "41" Or opt.Value = "177" Then opt.Selected = True Else opt.Selected = False End If Next opt End With Tim "KBL" wrote in message ... please pardon my newbishness... this is probably just something extremely simple, but i've had NO luck finding out how to do this... i've written code basically to have excel log into a website i use for my job and do this and that... but the part where i'm getting stumped is when i have excel use the code: With appIE sURL = "https://www.thewebsiteimaccessing.com/thereportineed" .Navigate sURL call ReadyWait 'waits for page to load .Document.all("firstcriteriafield ").Value = "12" .Document.all("secondcriteriafield").Value = "26" .Document.all("thirdcriteriafield").Value = "8" '****************** 'Here is where I need the correct code to have 'it select multiple options from the criteria listbox '****************** With .Document.all("fourthcriteriafield") .Value = "41" .Value = "177" .value = "178" End With .Document.all("btnRetrieve").Click End With if i've not managed to make my request clear... basically, i'm trying to find the code that will mimic ctrl+click in a multi-select listbox. any help? -- Oh, the creative possibilities! ^_^ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Question Involving COUNTIF and Possibly DCOUNTA | Excel Worksheet Functions | |||
Question Involving COUNTIF and Possibly DCOUNTA | Excel Worksheet Functions | |||
Question Involving COUNTIF and Possibly DCOUNTA | Excel Worksheet Functions | |||
Possibly a loaded question, but I think | Excel Discussion (Misc queries) | |||
Learning Macros and ActiveX controls...have a simple question... | Excel Programming |