+ Reply to Thread
Results 1 to 3 of 3

Can't see Macro in imported File

Hybrid View

  1. #1
    Registered User
    Join Date
    09-27-2018
    Location
    Germany
    MS-Off Ver
    2010
    Posts
    2

    Can't see Macro in imported File

    Hi. I'm fairly new to scripts and macros in excel and I have a small problem I can't seem to find a fix for.

    I have hundreds of files that need to be imported to excel with an add-in. The add-in I'm using is TDM Excel Add-In.

    The Add-In automatically detects the file extension in windows and I can directly double-click the file in windows to open it via the add-in.

    I need to save these imported files as a specific name that is written in a specific row and column (A2).
    This is the macro-script I'm using:

    Private Sub Speichern_Click()
    With Application.FileDialog(msoFileDialogSaveAs)
            .Title = "Datei speichern"
            .InitialFileName = Range("A2")
            .ButtonName = "Jetzt speichern"
            .Show
            .Execute
        End With
    End Sub
    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #2 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer

    It's working fine in other excel-files, but eventhough I've saved this macro within the Personal.xlsm file, so it is globally available, I don't see it in the development tab (nor can I use the shortcut).

    I think this is happening, because my file-format (from the imported data) isn't .xlsx yet.

    Is there a workaround to make the macro accessable?

    My final goal is to have an .exe-file that I can drop inside of the folder with all my data files and upon execution it automatically imports all the data and saves it as an .xlsx file with the specific name. But I think I need Microsoft Visual Studio for that.

    Anyway.. I'd really appreciate any kind of help or feedback to my problem. I couldn't find this specific case when using google.

    Greetings from Germany!
    Last edited by 6StringJazzer; 09-27-2018 at 10:59 AM.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Can't see Macro in imported File

    Change your Macro Name

    From

    Private Sub Speichern_Click()
    To

    Sub Speichern_Click()
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    09-27-2018
    Location
    Germany
    MS-Off Ver
    2010
    Posts
    2

    Re: Can't see Macro in imported File

    Unfortunately this didn't help.
    When I look in the developers environment I don't even see my VBA Project PERSONAL.XSLM in the imported file. Even when I save it as .xslx beforehand.
    Unbenannt.PNG

    Maybe the add-in im using to import the file isn't opening a macro compatible excel sheet?

    EDIT: I've tried saving the file after importing as an excel file with macros enabled. But still after saving there are no macros to be found anywhere. Only when I open a new excel sheet I can see my macros.

    EDIT2: I've found a workaround. If I open excel first, and then use the add-in to import the file. I have full access to my macros. If I open the file via double-click (the excel add-in automatically detects the file format) I dont see any macros. This is kinda annoying still, cause I have to open all the files manually and save them with my macro, but at least I've made some progress.

    EDIT3: Can anyone tell me, just in general (I'll do the research about "how" myself), if it's possible to create something like a batch file for example to automate the following process:
    1. open excel
    2. use add-in to import data
    3. use macro to save the file with a specific name
    4. close excel
    5. repeat with the next file in the folder
    Last edited by KaYaK1; 09-28-2018 at 02:45 AM.

+ 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] import every file in the folder and rename sheet to the imported file name
    By vivek_work in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 09-04-2012, 02:46 PM
  2. Modify file import macro to skip previously imported files.
    By dcgrove in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-04-2009, 04:37 PM
  3. get imported file name/date
    By eminthepooh in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-28-2009, 06:38 PM
  4. add imported text file name above imported data
    By tompie in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-27-2009, 08:18 AM
  5. Macro to name sheet with imported .CSV file name
    By MichielEngineer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-05-2008, 06:42 AM
  6. Cleaning up an imported txt file
    By yzer19 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-19-2007, 01:20 PM
  7. [SOLVED] CSV file Imported to Excel
    By JMay in forum Excel General
    Replies: 3
    Last Post: 12-07-2005, 12:25 PM
  8. [SOLVED] can I display the file name of the imported text file in another c
    By John-G in forum Excel General
    Replies: 0
    Last Post: 05-13-2005, 01:06 PM

Tags for this Thread

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