+ Reply to Thread
Results 1 to 4 of 4

Why my VBA Code keeps disappearing ???????

  1. #1
    Registered User
    Join Date
    11-19-2019
    Location
    ROK
    MS-Off Ver
    365
    Posts
    48

    Why my VBA Code keeps disappearing ???????

    I am trying to create VBA code for a function called which I am defining by:
    Public Function PictureLookup(Value As String, Location As Range, Index As Integer)

    I am doing this in a standard module within the Visual Basic Editor. (Alt-F11)

    I added it, but when I closed the spreadsheet and came back the code was gone, but the the function still showed up.

    It is a macro enabled file. I did do a search and found some information about macro sometimes saving to Personal.
    I will not let me post the link, but they say: If your macros disappeared, we suggest you locate the file name in the following location C:\Users\******\AppData\Roaming\Microsoft\Excel\XLSTARTSent.

    I went to this folder and it was empty.

    1) Any idea where my VBA went?
    2) How do I make sure VBA/functions stay with in the file that I create them?
    Attached Files Attached Files

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,913

    Re: Why my VBA Code keeps disappearing ???????

    Cannot replicate your issue. When I open your file and go to VBE, your Function is shown in Module 1.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    11-19-2019
    Location
    ROK
    MS-Off Ver
    365
    Posts
    48

    Re: Why my VBA Code keeps disappearing ???????

    Maybe this is me being new, but here is what I am doing:

    I open the file.
    I press Alt-F11.
    I go to view and Code.

    It shows general and I can pick workbook. Workbook has one function

    I go to insert and select Module and it brings up Module 3, but I can't see Module 1 or 2.

    How do I find Module 1?

    Thank you!!

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,913

    Re: Why my VBA Code keeps disappearing ???????

    Don't know what your issue is. Here is what I see.
    Attached Images Attached Images

+ 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. Why my VBA Code keeps disappearing ???????
    By ray.kanata in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 06-16-2015, 10:57 AM
  2. My zeros keep disappearing in VBA code
    By hollywoodbob in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-24-2014, 04:28 PM
  3. Large parts of my code is disappearing
    By Ronnie_Greytruck in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-24-2013, 09:53 AM
  4. [SOLVED] disappearing values with simple code
    By kamelkid2 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-21-2012, 10:21 AM
  5. Disappearing Macros/Code in VBA
    By nermal in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-09-2012, 12:55 PM
  6. disappearing worksheet_change VBA code - help!
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-11-2005, 03:25 AM
  7. [SOLVED] Add-Ins Disappearing?
    By Ben in forum Excel General
    Replies: 3
    Last Post: 07-18-2005, 05:39 AM

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