vba

Clicking a drop down option in iFrame with VBA excel

淺唱寂寞╮ 提交于 2021-02-17 02:15:09
问题 I'm trying to click the drop down option "Approve the Deal" in the below code. I have solid VBA backround but this is my first attempt at HTML automation with VBA excel. Thus far I'm able to navigate and login to the website, select the deal that needs to be approved, and show the drop down. However, I cannot figure out how to click the drop down option/trigger the event. I believe my gaps are dealing with the iFrame and/or table (something I did not have to deal with in the code to this

VBA Excel add new sheet with number based on the previous sheet created

可紊 提交于 2021-02-16 22:58:42
问题 I have the Sheet called "Area Map 1". I want to create the button, which will add the new sheet for me (copy the "Area Map 1") with the name Area Map 2. The button is going to add one sheet only. It means, that it can be used repeatedly if we need to create more sheets. However, if I use this button once, then my last existing sheet under this name is "Area Map 2". Using the button again will result from the error "The name is already taken, try the different one". What should I improve in

Select an option from a dropdown in IE and triggering a function

半城伤御伤魂 提交于 2021-02-16 21:22:17
问题 So, I am a newbiew in IE Automation for VBA.I will try to be very specific about my question. Recently, I have been trying to login to a website and then select a month from a dropdown list. I am able to select an option from the dropdown. However, when I click on the search Button, Results appear not for the values which I selected using VBA, but for the values that were originally there on the webpage. Normally, if one goes to the website, he has to click on the dropdown and select the

Extracting digits from a cell with varying char length

谁说我不能喝 提交于 2021-02-16 20:06:50
问题 I have a group of cells, the first of the string never changes, it is and always will (until the coder changes it) 20 characters (inc spaces). I then want to extract the 3 numbers (and in some cases 2) from the remaining sequence. The monthly cost is 2 silver, 1 copper and 40 iron. The monthly cost is 1 silver, 94 copper and 40 iron. The monthly cost is 1 silver and 75 copper. The monthly cost is 8 silver and 40 copper. The monthly cost is 1 silver. The monthly cost is 99 silver, 99 copper

Extracting digits from a cell with varying char length

时光总嘲笑我的痴心妄想 提交于 2021-02-16 20:06:35
问题 I have a group of cells, the first of the string never changes, it is and always will (until the coder changes it) 20 characters (inc spaces). I then want to extract the 3 numbers (and in some cases 2) from the remaining sequence. The monthly cost is 2 silver, 1 copper and 40 iron. The monthly cost is 1 silver, 94 copper and 40 iron. The monthly cost is 1 silver and 75 copper. The monthly cost is 8 silver and 40 copper. The monthly cost is 1 silver. The monthly cost is 99 silver, 99 copper

Error code is 91 on Find

*爱你&永不变心* 提交于 2021-02-16 19:59:40
问题 This may seem like a simple question but Im very new to VBA and Im not sure why I'm receiving the error. Dim c As String c = Sheet2.Range("B3:B54").Find("NLwk01") Error code is 91: Object variable or With block variable not set. I thought I should've maybe used cells instead of range, but that gives another error with Error code 5: Invalid procedure call or argument. 回答1: As it was mentioned in comment thread, Excel VBA Find() function returns the Range object. Therefore, pertinent to you

Click a button defined as a DIV with a SVG linked to a path with VBA

大憨熊 提交于 2021-02-16 19:50:18
问题 I am making an Excel sheet that takes pictures from a webshop and places them on Pinterest. When I try to submit the image URL I can't find the element to perform a click event. Full HTML code from Pinterest. <div data-test-id="website-link-submit-button" class="_50 _5a _6e _h _z7 _4q _j" style="height: 100%;"> <svg class="_u0 _3a _u1 _45" height="20" width="20" viewBox="0 0 24 24" aria-label="Verzenden" role="img"> <title>Verzenden</title> <path d="M6.72 24c.57 0 1.14-.22 1.57-.66L19.5 12 8

Import .DBF file in MS Access after button press, Using VBA

ⅰ亾dé卋堺 提交于 2021-02-16 18:37:20
问题 I have to import .DBF file int MS Access Table On button click. The file name is SourceTable.dbf ; Access database is StudentDataBase.accdb and the table I want to insert it is named myTable. First I want to ask: do I need to have the same fields in the table or it can just be a blank table. I have the following sample code: DoCmd.TransferDatabase transfertype = acImport, databasetype = "dBase III", DatabaseName = "C:/SourceTable.dbf", objecttype = acTable, Source = "SourceTable", destination

Import .DBF file in MS Access after button press, Using VBA

 ̄綄美尐妖づ 提交于 2021-02-16 18:37:13
问题 I have to import .DBF file int MS Access Table On button click. The file name is SourceTable.dbf ; Access database is StudentDataBase.accdb and the table I want to insert it is named myTable. First I want to ask: do I need to have the same fields in the table or it can just be a blank table. I have the following sample code: DoCmd.TransferDatabase transfertype = acImport, databasetype = "dBase III", DatabaseName = "C:/SourceTable.dbf", objecttype = acTable, Source = "SourceTable", destination

VBA Excel - How to display non equal values in an excel array

折月煮酒 提交于 2021-02-16 15:31:13
问题 So currently I have two DATA inputs in excel Data 1 and Data 2 I need a formula or some sort to display results *currently this is a manual process. 回答1: Approach using Filter() function Function test(ByVal a, ByVal b, Optional Delim$ = ",") As String 'Purpose: return non unique values by comparing two comma separated string lists a vs. b a = Split(a, Delim): b = Split(b, Delim) Dim elem For Each elem In b a = Filter(a, elem, False) ' Include:=False, i.e. exclude non uniques Next elem test =