[Solved] What would be the appropriate syntax for clicking the “send to” drop down menu? (See image for reference)

Try an attribute = value CSS selector to target the element by an attribute and its value. IE.document.querySelector(“[sourcecontent=”send_to_menu”]”).click Make sure you have a sufficient page load wait before trying to click. As a minimum you need While IE.Busy Or IE.readyState < 4: DoEvents: Wend IE.document.querySelector(“[sourcecontent=”send_to_menu”]”).click You could also use IE.document.querySelector(“#sendto > a”).click 0 solved What … Read more

[Solved] Simple VBA Select Query

Here is one way to do it: sSQL = “SELECT Variable FROM GroupTable ” Set rs = CurrentDb.OpenRecordset(sSQL) On Error GoTo resultsetError dbValue = rs!Variable MsgBox dbValue, vbOKOnly, “RS VALUE” resultsetError: MsgBox “Error Retrieving value from database”,VbOkOnly,”Database Error” solved Simple VBA Select Query

[Solved] I am confused on purpose of using “Not”, also on matching of “If” criteria, code says “is nothing” else run code for “MsgBox”

I am confused on purpose of using “Not”, also on matching of “If” criteria, code says “is nothing” else run code for “MsgBox” solved I am confused on purpose of using “Not”, also on matching of “If” criteria, code says “is nothing” else run code for “MsgBox”

[Solved] Macro to find header in excel

This is for your example i have grouped the 2 file data in single sheet. please see the below snap. I have created a small UDF to get your required output. Paste the below UDF in Module and you can directly call this from the cell itself. Public Function searchstring(a As Range, b As Range) … Read more

[Solved] Copying and Pasting between Workbooks VBA

As you have supplied no code, this should be sufficient enough to get you started. You’ll need to edit this and fix this to suite your needs. Sub test() Dim Wb1 As Workbook, Wb2 As WorkBook, Wb3 As Workbook Dim MainBook As Workbook ‘Open All workbooks first: Set Wb1 = Workbooks.Open(” path to copying book … Read more

[Solved] How to find the days difference between two dates [closed]

Instead of using vba just enter the formula for the first row on C1 : =ROUND(a1,0)-ROUND(b1,0) Then just the formula to the end of exisiting rows. If you insist using vba code use the simple code below: Dim LastRow As Long LastRow = ActiveSheet.Range(“A” & Rows.Count).End(xlUp).Row Range(“c1”).Select ActiveCell.FormulaR1C1 = “=ROUND(RC[-1],0)-ROUND(RC[-2],0)” Range(“c1”).AutoFill Destination:=Range(“C1:C” & LastRow) End … Read more

[Solved] VBA scripting for MS excel

I think this is what you meant, the following code loops through all rows with data, and for each row checks if the word “man” is inside that strings (using the Instr function). Sub FindMan() Dim FindString As String Dim Sht As Worksheet Dim LastRow As Long Dim lRow As Long ‘ modify “Sheet1” to … Read more

[Solved] Copying the cell and delete column under the certain condidions [closed]

Your description is vague, but to get what you described exactly: Public Sub Process() If Range(“A2”).Value <> “” Then Range(“B2”).Copy Range(“C3”) Range(“B2”).EntireColumn.Delete End If End Sub Edit In worksheet code: Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Address = Range(“A2”).Address And Range(“A2”).Value <> “” Then Range(“C3”).Value = Range(“B2”).Value Range(“B2”).EntireColumn.Delete End If End Sub I think … Read more