+ Reply to Thread
Results 1 to 9 of 9

make xlam store inserted text to itself rather than open workbook

  1. #1
    Forum Contributor ANDREAAS's Avatar
    Join Date
    05-06-2013
    Location
    Port Elizabeth, South Africa
    MS-Off Ver
    Excel 2007 / 2010
    Posts
    368

    make xlam store inserted text to itself rather than open workbook

    I'm not even sure this is possible, but here goes...
    I have an add in with a userform where you enter a reminder and set a time for the reminder to pop up, currently the reminder text is saved in the active sheet, which means the active sheet of whichever workbook is open at that momentm
    I want the reminder text to save to the add in file rather than the open workbook...
    Is this possible. And if so, please help with the code to make it happen.
    Sorry for not uploading my example, new it rules at work prohibits me from doing so, so I'm working off my phone at the moment.

  2. #2
    Forum Contributor CobraLAD's Avatar
    Join Date
    07-23-2007
    Location
    Boksburg, South Africa
    MS-Off Ver
    Office 2019
    Posts
    346

    Re: make xlam store inserted text to itself rather than open workbook

    ANDREAAS

    yes it is possible. Use

    ThisWorkbook.Sheets("Sheet1").Range("A1").Value = "reminder text" 'change to your range

    Thisworkbook.Save ...........

  3. #3
    Forum Expert
    Join Date
    06-25-2009
    Location
    Sofia, Bulgaria, EU
    MS-Off Ver
    Excel 2003-2013
    Posts
    1,290

    Re: make xlam store inserted text to itself rather than open workbook

    You can use ThisWorkbook, e.g.
    Please Login or Register  to view this content.
    If you are pleased with a member's answer then use the Star icon to rate it.

  4. #4
    Forum Contributor ANDREAAS's Avatar
    Join Date
    05-06-2013
    Location
    Port Elizabeth, South Africa
    MS-Off Ver
    Excel 2007 / 2010
    Posts
    368

    Re: make xlam store inserted text to itself rather than open workbook

    Think I need a pair of opposable legs rather than thumbs, so I can kick myself... I did not even consider the "thisworkbook" procedure.

    Thank you cobralad, I'll try it out.
    1000000 million rep, coming your way

  5. #5
    Forum Contributor ANDREAAS's Avatar
    Join Date
    05-06-2013
    Location
    Port Elizabeth, South Africa
    MS-Off Ver
    Excel 2007 / 2010
    Posts
    368

    Re: make xlam store inserted text to itself rather than open workbook

    Sorry I only have 1000000 rep left, so you guys, cobralad and buran wil have to share lol

  6. #6
    Forum Contributor ANDREAAS's Avatar
    Join Date
    05-06-2013
    Location
    Port Elizabeth, South Africa
    MS-Off Ver
    Excel 2007 / 2010
    Posts
    368

    Re: make xlam store inserted text to itself rather than open workbook

    Sorry guys, seems I was a bit zelous with my celebration...
    I tried the code that cobralad and buran provided, but the values still save to the currently open workbook rather than the xlamm thank for your efforts anyway!
    Any other ideas?

  7. #7
    Forum Expert
    Join Date
    06-25-2009
    Location
    Sofia, Bulgaria, EU
    MS-Off Ver
    Excel 2003-2013
    Posts
    1,290

    Re: make xlam store inserted text to itself rather than open workbook

    The code is correct. The problem is somewhere else. where do you put the code? can you upload at least the code, if not the addin itself?

  8. #8
    Forum Contributor ANDREAAS's Avatar
    Join Date
    05-06-2013
    Location
    Port Elizabeth, South Africa
    MS-Off Ver
    Excel 2007 / 2010
    Posts
    368

    Re: make xlam store inserted text to itself rather than open workbook

    Sorry buran. It works 100%. I added some other code which caused the problem afterwards.

    Thanks again for the help. You rock!!!

  9. #9
    Forum Contributor ANDREAAS's Avatar
    Join Date
    05-06-2013
    Location
    Port Elizabeth, South Africa
    MS-Off Ver
    Excel 2007 / 2010
    Posts
    368

    Re: make xlam store inserted text to itself rather than open workbook

    Sorry buran. It works 100%. I added some other code which caused the problem afterwards.

    Thanks again for the help. You rock!!!

+ 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] Open workbook, and get its name, and make it active window.
    By Andrew Andromeda in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 01-20-2015, 09:00 AM
  2. Open different workbook and store data to variables
    By Cerkit in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 04-15-2013, 09:40 AM
  3. Identically named UDF in Workbook and Personal.xlam
    By volfied in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-30-2012, 12:52 PM
  4. [SOLVED] Macro to make the workbook open sheet 1
    By Oeysbrei in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-02-2012, 09:57 AM
  5. SUMIF.XLAM is already open.
    By chuck edwards in forum Excel General
    Replies: 0
    Last Post: 02-17-2012, 12:42 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