Consulting

Results 1 to 3 of 3

Thread: I need custom table layout available in all Excel workbooks created by me

  1. #1
    VBAX Newbie
    Joined
    Apr 2025
    Posts
    2
    Location

    I need custom table layout available in all Excel workbooks created by me

    Hello.

    I've created a custom layout for tables, which I have in the templates for sheets and workbooks, but it doesn't appear in the workbooks I've already created.

    The mere thought of having to move all the workbooks I've already created to those templates gives me cold sweats.

    Therefore, I wanted to know if there was a way to integrate them into the Excel spreadsheets I've already created.

    I'm attaching screenshots in case it helps you better understand what I need.





    Thanks.

  2. #2
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,449
    Location
    Welcome VBAX zelarra. Maybe this could be an option... Create a sub similar to that below which must be stored in your "Personal Macro Workbook"
    Private Sub Workbook_Open()
        ' Replace these lines with the code that applies your custom layout
        ' For example, you might adjust column widths, row heights,
        ' apply specific themes, zoom levels, window states, etc.
        ' Example: Set default zoom to 85%    ActiveWindow.Zoom = 85
        ' Example: Adjust column A width    Columns("A").ColumnWidth = 15
        ' Example: Ensure gridlines are visible
        ActiveWindow.DisplayGridlines = True
        ' You can call another macro here that contains your more complex layout settings
        ' Call ApplyMyCustomLayout
    End Sub
    
    ' Optional: A separate sub to hold more complex layout code
    
    Sub ApplyMyCustomLayout() 
        ' Your more detailed layout adjustments here
    ' End Sub
    When you open any Excel workbook, including older ones, Excel automatically runs the Workbook_Open() macro in your PERSONAL.XLSB file. This will then execute the code you've written to apply your desired layout settings.
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  3. #3
    VBAX Newbie
    Joined
    Apr 2025
    Posts
    2
    Location
    Thanks a lot, guys.


    In the end, I have to sit down and generate all the code, because it seems I can't "capture" the design of the style I've already created.


    Best regards.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •