Search:

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

Page 1 of 6 1 2 3 4

Search: Search took 0.33 seconds.

  1. Replies
    28
    Views
    383

    Re: Need help with Get External Data (long shot question!)

    No, I do mean a new workbook, to keep it separate from my first attempt.

    The first routine (starting Public Sub Get_Tax_Credits) should be pasted into a new standard module (also called a regular...
  2. Re: Export excel sheet as PDF to an existing folder

    I tried Leith's code with a picture on Sheet3 and the picture is saved in the PDF file.
  3. Re: Prevent deletion of last row of excel table

    Sorry, but preventing deletion of the Total Row completely escaped me. The fix is to lock the entire row in which the Total Row occurs.


    Public Sub Lock_Table_Header_and_Total_Rows()

    Dim...
  4. Replies
    28
    Views
    383

    Re: Need help with Get External Data (long shot question!)

    Yes, it is possible to automate this with no manual intervention or having to put the required year in a cell - my first solution was just to show that the correct web page data is imported for the...
  5. Replies
    28
    Views
    383

    Re: Need help with Get External Data (long shot question!)

    It sounds like you're not using the macro correctly - you shouldn't be 'refreshing', the macro imports the web site table from:


    https://www.taxtips.ca/nrcredits/tax-credits-XXXX-base.htmwhere...
  6. Replies
    28
    Views
    383

    Re: Need help with Get External Data (long shot question!)

    Try this macro. It runs a web query to import the data for the specified year (in B1 on the active sheet, so no need to change your computer's date) starting at A3.


    Public Sub Get_Tax_Credits()...
  7. Re: Prevent deletion of last row of excel table

    I'm unable to reproduce the problem - for me, the table's Total Row can't be deleted. Remember, the code is referencing the first table on the active sheet.

    Do any errors occur? If so, what is...
  8. Re: Prevent deletion of last row of excel table

    A possible solution is to lock the table's Header row and Total row and protect the sheet but allow users to insert and delete rows.

    This macro does this on the first table in the active sheet,...
  9. Replies
    26
    Views
    25,922

    Re: Convert String to MD5 Hash

    I'm also using Excel 2016 32-bit and get the same results as you. The problem is that the StrConv function is unable to convert all Unicode characters to UTF-8 encoded bytes. There is a good...
  10. Replies
    4
    Views
    124

    Re: Remove empty rows from .txt file

    You're correct about changing those two variables to Object to fix the errors. I inadvertently left them as early-bound data types, which require a reference to MS Scripting Runtime.

    Try this...
  11. Replies
    4
    Views
    124

    Re: Remove empty rows from .txt file

    A different approach is needed - use FileSystemObject to create the text files from the arrays.


    Sub Split1536Loop()

    Dim Wb As Workbook
    Dim FileNameExt As Variant
    Dim...
  12. Replies
    3
    Views
    127

    Re: Advanced filter from another workbook

    Yes, try using the Sharepoint path, although I've never used Sharepoint so don't know if it will work.

    As a test, have both files on your local drive and see if the time taken to open the Project...
  13. Replies
    3
    Views
    127

    Re: Advanced filter from another workbook

    The simplest solution is to open the Project Log workbook momentarily and do the advanced filter on the required sheet (here named "Data Sheet") in that workbook:

    Private Sub...
  14. Re: Drag-down VBA function (many sheets) snag

    Your code looks OK - which line causes the error? Click Debug on the error message and the errant line is highlighted in yellow. (BTW it's easier for people helping you to put the complete error...
  15. Replies
    1
    Views
    84

    Re: PDF Manipulation in VBA

    The code at https://www.mrexcel.com/forum/excel-questions/979092-extract-page-pdf-based-selected-keywords-excel.html shows how to delete pages in a PDF file using the Acrobat API - the DeletePages...
  16. Re: Export excel sheet as PDF to an existing folder

    From your description and 'reading between the lines' because your description is a little ambiguous, my understanding is that your main folder is "C:\Users\SSF1590\Desktop\TARA Project\Folders" and...
  17. Re: Copy worksheets to new workbook, delete connections, then save new workbook

    This macro copies the two worksheets named "Sheet1" and "Sheet2" to a new workbook and then deletes workbook connections, workbook queries and Excel links in the new workbook. The new workbook is...
  18. Re: Excel VBA - Export the same range changed by a function to a PDF file

    My code copies the cell values and formats for the specified range to the temporary sheet, so the temporary sheet and therefore the PDF should look exactly like the range on the original source...
  19. Re: Upgraded to 2016: Graphs are no longer animated running VBA

    Try activating the chart object:

    ActiveSheet.ChartObjects("Chart 1").Activate
  20. Re: Excel VBA - Export the same range changed by a function to a PDF file

    Try this macro, which adds a temporary sheet and copies A1:D5 to the next row, three times. It also puts a page break between each block of cells. Just change the PDFFullName string value to the...
  21. Re: How to publish as web page with relative path

    As you have multiple publish objects we need to loop through them and change the filename property to the current folder.

    Private Sub Workbook_Open()

    Dim po As PublishObject
    Dim p As...
  22. Re: How to publish as web page with relative path

    See if this code works for you. The code must be placed in the ThisWorkbook module so that it runs when the workbook is opened. The code simply changes the folder path of the workbook's first...
  23. Replies
    5
    Views
    186

    Re: Email PDF code - save a copy

    Using C4:


    ThisWorkbook.SaveCopyAs Replace(Range("C4").Value, ".pdf", ".xlsm")
  24. Re: Assistance with a routine to be triggered based on specific days and time of the week

    We can use Windows API functions to read the Excel command line, and the Workbook_Open can take different actions depending on whether the workbook was opened by the Task Scheduler or not.

    Put...
  25. Replies
    41
    Views
    1,146

    Re: Faster way to loop

    This should be slightly faster.

    Dim rng As Range
    Dim lColorCounter1 As Long, lColorCounter2 As Long
    Dim rgb1 As Long, rgb2 As Long
    Dim rngCell As Range
    rgb1 = RGB(0, 176,...
Results 1 to 25 of 150
Page 1 of 6 1 2 3 4