+ Reply to Thread
Results 1 to 4 of 4

Modifying Worksheet From AddIn

  1. #1
    Forum Contributor
    Join Date
    06-18-2010
    Location
    USA
    MS-Off Ver
    Excel 2016
    Posts
    546

    Modifying Worksheet From AddIn

    I have a Excel Add-In that is a .xlam and has a module in it. I am needing to add to that module and manipulate a worksheet. If I test my syntax in a standard workbook standard module it works as expected, but the second it is added into the add-in syntax it stops behaving the way that it should.

    Issues with synatx:
    1) Pop-up asking where Sheet named Helper is (it is a sheet in the open workbook, verified name was exactly right, no whitespace)
    2) Unable to write to sheet that is saved in add-in (again verified name is exactly right, no spaces or whitespace etc)

    Syntax - to access the worksheet that is in the add-in I use this
    Please Login or Register  to view this content.
    No error is thrown there, but the second I try to write to it like this, nothing is ever written to the sheet.
    Please Login or Register  to view this content.
    Display of issue with accessing data on active worksheet the sheet that is visible in the workbook, if I try to use a quick count to get the last row an error is thrown that says application defined or object defined error.

    Please Login or Register  to view this content.
    How can I use a macro from an addin to access & modify sheets in the workbook/add-in?

  2. #2
    Forum Expert
    Join Date
    10-02-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    1,222

    Re: Modifying Worksheet From AddIn

    Curious why it needs to be an addin?

    Have you tried unhiding the sheets prior to working with them?

    Also have you tried changing from "thisworkbook" to a more explicit reference to the addin/workbook?

    You could also toggle the .IsAddin property of the xlam workbook to false before writing to it and true when you are done. Im leaning towards this being the answer

  3. #3
    Forum Contributor
    Join Date
    06-18-2010
    Location
    USA
    MS-Off Ver
    Excel 2016
    Posts
    546

    Re: Modifying Worksheet From AddIn

    It is an addin due to that being the current process and I am just trying to add to it for additional manipulation.

    How would I change from "thisworkbook" to a more explicit reference?

    I will look for syntax on changing the .IsAddin property of the xlam to false so I can "see" the sheets and write to them/modify them.

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Modifying Worksheet From AddIn

    Hi

    Why are you trying to write to a sheet in the add-in and how are you verifying that it doesn't work, given that you can't see the worksheet in question?
    Don
    Please remember to mark your thread 'Solved' when appropriate.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Cannot Run Multiple Macros on Same Worksheet Without Modifying Worksheet
    By Sorliene in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-21-2017, 12:39 PM
  2. [SOLVED] Modifying Excel Ribbon for Executing AddIn Sub Procedures
    By brassrat in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-29-2016, 08:45 AM
  3. Modifying Data on Another Worksheet
    By jason_kelly in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-01-2010, 03:11 PM
  4. How to view addin's worksheet?
    By jp001 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-11-2009, 08:42 AM
  5. Macro to save shared addin to personal addin folder
    By MrStyx in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-31-2008, 10:13 AM
  6. Sorting an Addin Worksheet
    By MSweetG222 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-13-2006, 09:30 AM
  7. Worksheet visible in an addin ?
    By DS NTE in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-26-2005, 04:05 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1