Posts by Bah73

    Hi,


    I have a macro enabled workbook and occasionally I open the workbook and get an error message requiring a repair to the workbook.


    Does anyone know what this is?


    Code
    <recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
    <logFileName>error344480_01.xml</logFileName>
    <summary>Errors were detected in file 'D:\Files\Planner\Planner Tool.xlsm'</summary>
    <removedRecords>
    <removedRecord>Removed Records: Sorting from /xl/tables/table31.xml part (Table)</removedRecord>
    </removedRecords>
    </recoveryLog>

    Thanks Rory

    Following your advice I came up with the following working code

    Allowing me to reference several sheet code names and tables from the active sheet.

    Hi,


    I am trying to reference a sheet and table (both have the same name) by using the sheets code name and table name that i have in cell "A1"


    I am currently getting a Compile Error: Type Mismatch


    Any help appreciated thanks


    Thanks Carim,


    Basically I am applying a column filter then adding a value to an adjacent column


    I problem I am having is when the filter returns no value the code still adds a value to the adjacent column


    This creates a new task line


    The code I need help with is if the filter returns no values to skip to next filter block


    I cannot upload a Project file so have added some code below


    For the final touch I added this to the sheet module where the chart is located.


    Now every time I open the sheet to view the chart the transpose data and pivot table data update automatically.


    Does anyone know why I was getting the @ symbol in my formula if I was trying to insert it with VBA?


    See first post.


    Code
    Private Sub Worksheet_Activate()
    Call Refresh_Chart
    End Sub

    All good Carim I figured out how to use the code you supplied.


    The transposed data is used to create a pivot table for a chart.


    I created button with a refresh all code including your code and so every time I refresh the chart the transpose data updates.


    Thanks Carim,


    That code works but it only transposes the values and doesn't insert the formula into the cell.


    This is a problem because when the main sheet data is updated the transposed data don't update with it.

    Hi,

    I am trying to inset a formula with VBA, and I am getting the following result.


    The formula I want is =TRANSPOSE('MOH Chart'!M2:APF7)

    The result I am getting is =@TRANSPOSE(@'MOH Chart'!M2:APF7)


    My code is below.


    Can anyone please help?


    Code
     WS1.Range("A2").Formula = "=TRANSPOSE('MOH Chart'!M2:APF7)"

    Hi,


    Can anyone please help me with this


    I am trying to insert a formula with a Last Row Address reference, and I can't get the wording correct on (M8:LastR)

    Code
    LastR = Range("M" & Cells(Rows.Count, "M").End(xlUp).Row).Address
    WS1.Range("M4").Formula = "=SUM(M8:LastR)"

    Thanks KjBox that works awesome

    Is there any way to name the sheets instead of sheets(1) and Sheets(2)?

    ie

    1. Dim WS1 As Worksheet
    2. Dim WS2 As Worksheet
    3. Set WS1 = Worksheets("Base")
    4. Set WS2 = Worksheets("Comments")

    Hi,


    I have a Transfer Data loop that runs very slow.


    Is there any way to make this more efficeint?