Excel VBA internet explorer automation to create a Google Calendar event - excel

I'm trying to automate the process of booking appointments into Google calendar through excel VBA.
I can open internet explorer but I can't get it to click on the (RED) "CREATE" button to allow me to enter my data and variables from excel.
I was trying to use GetElementByID() but couldn't find the ID in the source code.
Hope to hear from someone as this has really stumped me this time and I don't like being beaten by a challenge.

I just figured this out for myself today after two months of trying to figure it out. For some reason, looping through the div elements to find "Create" innerText and then click it doesn't work. However, the item index of the div container is 180 and if you specify that, then you can click it.
So here's the code that will click the "Create" button.
ie.document.getElementsByTagName("div").Item(180).Click

Related

Spotfire non-editable button

I am sort of new to Spotfire. There is feedback button in a dashboard I am working on, and I am trying to edit that button, but I can't find the option anywhere. The button also gets created automatically when a new page is created. Is there something I am missing? Has anyone encountered this? Any help would be
I tried to edit the HTML but there is no option for this particular button.

How to select a value from a pop screen and bring back to main screen in excel VBA through Selenium

I have a web form in which I need to enter repetitive data to configure the application and I am writing an excel macro in VBA to achieve this.
Data entry to all fields went well except one field. The field contains a pre-validated list of values, so there are two values SALES and SALES_TAX and when I put SALES, it opens up a pop up screen to select either through image or a radio button to bring the value back to main screen.
I could not able to achieve it and need some help on this please.
Thanks
AM
I am uploading a screenshot and few commands which I tried as below but failed to achieve the desired result,
Sceenshot
driver.FindElementByXPath("//input[#class='xo' and #id= 'N1:N8:0']").Click
driver.FindElementByXPath("//input[#id='N1:N8:0']").Click
driver.Actions.Click ("/SALES")pe here

Clicking checkbox on an intranet web page not working in VBA using Internet Explorer 11

I am stuck at a specific point in coding VBA. Using VBA I am logging onto an Intranet portal which is a file management system and opening a series of dynamic web pages one after the other. Using VBA I am trying to get a checkbox element checked. Once this element is checked, all sub-elements appearing in a table below get checked automatically. After this I need to initiate download of all the selected files. However, I cannot get the checkbox element "checked".
Here is the HTML as it appears on the web-page. I cannot share the link as it is intranet and confidential.
Link to the HTML as I am not allowed to post images yet
Here is my VBA code:
Set inpute = objIE.Document.queryselector("div[id=gridx_Grid_2] div div div table tbody tr td span[aria-checked=false]")
inpute.setAttribute("aria-checked") = True
inpute.Click
When the above code is run, the "aria-selected" attribute changes to "true" in the HTML but Click has no effect on the checkbox.
I have tried using the getElementbyClassName method and using Click after that to no avail.
Please help me out on this issue. Do let me know in case you need any other information.
This solution from Zwenn worked perfectly:
First of all, a checkbox has no click event. On topic: Because the whole List of other checkboxes will be marked by marking the one in question, I'am pretty sure the one in question triggers a HTML event like change when you mark it manually. You must check which event it is and trigger it with VBA. You can look for the event with FireFox or Chrome, but not with the IE. Look here how to do that and how to handle with events:
Automate IE via Excel to fill in a dropdown and continue
– Zwenn 14 hours ago

Javascript Calendar popup from ribbon button

Does anyone have any examples of a calendar popup that can be triggered using a ribbon button on a form?
I'm looking to have a popup where the user can select a date from the calendar which will then pass the value back to the javascript that launched it. I've seen that this can be done from a html popup but my efforts to create this so far haven't really been successful, so was hoping someone could advise me on the best solution.
Thanks
I've managed to find a good calendar that I have used for this solution. It can be found at https://github.com/dbushell/Pikaday
With this I put it into a html popup that had a text box on it (which would store the selected date) and had the javascript on my ribbon button show the popup.
The download includes the js files for the calendar to function and with a little tweaking of these you can make the calendar appear immediately on opening of the popup and not hide when a date is selected. Plus the text box can have its options changed so that it isn't visible to the user.
All put together this creates a rather pleasant looking calendar popup
You can use the date parameter type from html without using javascript
<input type=date >

form view in excel for a record

I have a sheet in excel that is basically like a database (yes it has to be in excel unfortunately) and I want to design a simple form to display the records (the different column values in the rows). Usually MS is good with making widgets to do this but I cant seem to figure out how to write it in VBA (easily)
Basically I have a list of Names and ID#'s then some other columns that need to be filled in (address, order # etc) but I'd like the user to do this via a form rather than typing in excel. I created a small form in VBA, but now I cant link the columns to the textboxes in the form.
Anyone know of any code I can plug and play to do this.
Specifically I am using a ComboBox (for the list of names) and then a for loop searching through it to find the selection and updating data. But its a real pain.
plus I cant figure out how to put in a 'Next' button, which is really annoying me. Does anyone know how to change the comboBox value to the next row, if it is linked via RowSource
Have you considered the Form feature? You can find under the commands you can add to your QuickAccess toolbar.
Check this helpful tutorial for additional details.

Resources