Search:

Type: Posts; User: John_w; Keyword(s):

Page 1 of 6 1 2 3 4

Search: Search took 0.32 seconds.

  1. Re: When the search button is clicked using vba the text entered in search box is not seen by web page

    The method I suggested is dispatchEvent, not SendKeys.
  2. Re: vba Export Excel to PDF. 2 pages. One Portrait, One landscape.

    Your original code should work with 2 changes:

    Sub ExportPDF2()
    Dim sFile As String


    sFile = "C:\Users\David\Documents\Projects\Internal\PDFs\" &...
  3. Replies
    14
    Views
    466

    Re: VBA Looping pulling from web

    Kyle's code in #3 needs:


    getprices = retimmediately before the End Function statement.
  4. Re: When the search button is clicked using vba the text entered in search box is not seen by web page

    You probably need to send events when inputting the search string to emulate what the page does when manually inputting the search string.

    Using your browser's DOM Inspector, you'll see that the...
  5. Re: Export Excel CSV to MS word with specific table format

    Try this macro:

    Public Sub Create_Table_From_Csv_File()

    Dim csvFile As String
    Dim FSO As Object
    Dim csvTextStream As Object
    Dim csvLines As Variant
    Dim csvData As...
  6. Replies
    5
    Views
    184

    Re: Match Folder Name with cell value

    Change vbNormalFocus to vbMinimizedNoFocus.
  7. Replies
    5
    Views
    184

    Re: Match Folder Name with cell value

    Try this macro:

    Public Sub Open_Folder2()

    Dim folderPath As String

    folderPath = ThisWorkbook.Path & "\..\" & Format(ActiveSheet.Range("B4").Value, "MM YYYY")

    If...
  8. Re: Trouble Copying from txt file to Excel - pastes into one cell only

    Try this:

    Sub CopyTextFile()
    Dim oFso: Set oFso = CreateObject("Scripting.FileSystemObject")
    Dim oFile: Set oFile = oFso.OpenTextFile("D:\Spares\Inventory\list_of_spares.txt", 1)
    Dim lines As...
  9. Replies
    5
    Views
    184

    Re: Match Folder Name with cell value

    What is the folder path which contains the example '08 2019' subfolder?

    This macro uses Application.DefaultFilePath as the folder path, which is usually C:\Users\your username\Documents, so it...
  10. Re: VBA code to apply conditional formatting to last row with data in a table

    I included the MsgBox prompt to allow you to confirm that the code was correctly finding the last row with data. Just comment out that line or delete it when you don't need the confirmation.

    Does...
  11. Replies
    4
    Views
    132

    Re: Save sheet as PDF

    ONo = UCase(Range("U20").Value)
    Fleet = UCase(Range("AP17").Value)
  12. Replies
    4
    Views
    132

    Re: Save sheet as PDF

    Here's one way:

    JNo = Range("U18").Value
    QNo = Range("U19").Value
    ONo = Range("U20").Value
    ESN = Range("AP9").Value
    If JNo <> "" Then JNo = JNo & "; "
    If QNo <> "" Then QNo = QNo...
  13. Replies
    1
    Views
    107

    Re: Convert PDFs into text?

    Try this macro on one of the PDFs. It copies and pastes the specified PDF to the active sheet. Change the PDF file and Acrobat Reader file path to suit.

    The code uses SendKeys which isn't...
  14. Re: getElementbyID excell vba click on the link in a sidebar

    I cannot test because your URL presents a login page.

    Maybe this:


    Dim HTMLdoc As HTMLDocument
    Dim textInput As HTMLInputElement

    'After logging in and page has completely...
  15. Re: Move WB to new Folder base on Text in File

    Add a back slash to end of dFolder:

    Const dFolder = "C:\Users\UserA\ApplicationImport\NO_TICKET\"

    and to move the file:

    Name pFolder & sFile As dFolder & sFile
  16. Re: VBA : Resize 2 Pictures in Specific Range (G13 & D13) Wtih Simultaneously

    The macro at https://www.mrexcel.com/forum/excel-questions/1082446-fit-all-selected-pictures-cell-size-vba-macro-post5201112.html#post5201112 is a modified version of your macro to resize one or more...
  17. Re: VBA code to apply conditional formatting to last row with data in a table

    Bug fix

    My macro doesn't apply the conditional formatting to the correct row if the last row with data is the last row in the table or if the first column in the table is empty. Add this code...
  18. Re: VBA code to apply conditional formatting to last row with data in a table

    Try this macro:

    Public Sub Change_CF_To_Last_Data_Row_in_Table()

    Dim table As ListObject
    Dim lastDataRow As Long
    Dim cf As FormatCondition

    Set table =...
  19. Replies
    8
    Views
    344

    Re: Dynamic array in autofilter

    This macro puts the visible values from column 1 in Table1 into myArray and then filters column 7 of Target_table with that array.

    Public Sub Filter_with_Array()

    Dim Table1 As ListObject
    ...
  20. Replies
    4
    Views
    99

    Re: vba code to get element from label name

    Which event is it meant to fire? Use your DOM browser to see which event(s) are assigned to the select element and fire them using FireEvent or dispatchEvent

    Just guessing - maybe it needs the...
  21. Re: getElementbyID excell vba click on the link in a sidebar

    Maybe this:

    Dim HTMLdoc As HTMLDocument
    Dim textInput As HTMLInputElement
    Set HTMLdoc = IE.document
    Set textInput = HTMLdoc.getElementById("txtSearchFlight")
    textInput.value = "1234"
    You may...
  22. Replies
    4
    Views
    99

    Re: vba code to get element from label name

    Add this to your code (requires references to MS Internet Controls and HTML Object Library):

    Dim IE As InternetExplorer
    Dim HTMLdoc As HTMLDocument
    Dim selectElement As HTMLSelectElement
    ...
  23. Replies
    8
    Views
    344

    Re: Dynamic array in autofilter

    Assigning a range to a Variant (your TempArray) creates a 2-dimensional array, even if the range consists of only 1 column or 1 row. However, the AutoFilter's Criteria1 argument expects a...
  24. Replies
    2
    Views
    156

    Re: Iframe access to login to page

    The problem is that the iframe which contains the login fields is in a different subdomain to the main page, and therefore cross-domain security prevents you accessing the HTMLDocument inside that...
  25. Re: VBA IE Automation issue with Angularjs input text

    What is the URL? It's very difficult to help without knowing that.

    You could try dispatchEvent on the text input element instead of FireEvent. The example code below requires a reference to the...
Results 1 to 25 of 150
Page 1 of 6 1 2 3 4