1. JackDanIce

    Config file to control matching variables across .xlsm files?

    Hi, I have 11 parent .xlsm files and unknown number of child .xlsm files. Each parent file has a year variable Each child file has a date variable, a year variable and a string variable. Year variable is same value across all files Each child file has the same value variable A user needs to...
  2. H

    Need to set up a constant

    I have set up a constant as follows Const C As String = .xlsm Sub Open_Fies () Windows("M_ERT Sales(P).xls").Activate Application.Run "'M_ERT Sales (P).xls'!Data_INPUT" ActiveWorkbook.Close Windows("M_ERT Sales (P)" & "C &").Activate ActiveWorkbook.Close Windows("Open...
  3. H

    Extract .xls or .xlsm files within a folder and sub-folder

    I have a macro to extract excel files from c:\PULL as well as sub-folder within pull that are .xls or .xlsm The .xls or being extracted but not the .xlsm if there is an xlsm file Kindly amend my code below Sub List_Man_Acc_FileNames() Sheets("file names").Range("A1:C150").ClearContents...
  4. B

    Need help with this small macro

    Hi, I have the following code for saving a new sheet, but this only works when the original file is .xlsm. Any way to change this to work when the original file is .xltm? When the original file is .xlsm it saves in the right shared Onedrive folder, but when the original file is .xltm the now...
  5. P

    Install Excel 365 on server so I can guaranty that file gets run.

    I understand that it is frowned upon, and in some places, considered 'bad practice', but how else can you do this? I have a .xlsm file that runs competently unattended. I want to be sure that it runs everyday. How else can I do this if not on a server?
  6. S

    SaveCopyAs to Sharepoint (error 1004)

    Hi, Could anybody explain why this macro is not working when I try to save to Sharepoint, but it works perfect when I save on local disc. The error message I get is: Run-time error 1004: Sorry we couldn´t find "https://......." Is it possible it was moved, renamed or deleted? <code...
  7. Nelson78

    VBA and Excel: save a copy in .xlsm and a copy in .xlsx

    Hello everybody. I have a file in format xlsm named example.xlsm At the end of a Macro run, I need a one more copy of this file in format .xlsx (to send my workmates via mail), saved in the same folder. Of course, preserving the existence of the .xlsm master. How can I perform this task...
  8. B

    Excel Default Saving as .htm Format

    I've been running into an issue where after running a macro to generate an excel spreadsheet, when I click on the save icon in this newly generated excel workbook it gets saved as a .htm file, but when I do file->save as, it is appropriately saved in .xlsm format. I'm not entirely sure why there...
  9. M

    XLSM vs. XLSB

    I have a complex workbook with a lot of macros. Yesterday, I noticed the file size shrank by 15% when I switched from .XLSM to .XLSB. All the macros seem to work - though command buttons seem to flash strangely at times. The performance speed is about the same (less volatility in macro speed...
  10. V

    .xlsm file to always open in new excel instance

    Hi i have a project .xlsm file which opens in existing Excel sessoin. I use excel 2010 Problem is that if there are already open excel files, this .xslm file runs very slow. cAN I build a code within this file which will open this file in a new session only. Many thanks in advance. Regards...
  11. R

    Next Invoice Coding

    I am trying(and i know i have done this before) save the file name with a space between each range. This is what i am running and all the numbers run togather: NewFN = "C:\Users\garyk\Documents\ATI\CN\2018\CN" & Range("K2").Value & Range("I4").Value & Range("K3") & ".xlsm" File name looks...
  12. L

    Dialog box is appearing twice before saving

    I have written the SUB below - when I clicked [X] it is working all right - but the dialog box is appearing twice before saving. When I used the SAVE Icon - it does the same thing BUT there's a prompt that say "Excel has stop working" - when I ignore the prompt - it saves the file. I am trying...
  13. K

    VBA EXCEL: Fixing “Runtime-error '9'”: Subscript out of range

    Hello, I have the below code which attempts to select several sheets in a wordbook and save them on a separate file, but I'm getting the “Runtime-error '9'”: Subscript out of range, can someone assist to fix it? Thanks Sub SaveSheetsAsFiles() Dim SheetsToSave SheetsToSave = Array("Rainbow"...
  14. D

    VBA to convert large volume of text files (*.txt) to (*.xlsm) files

    First timer, high excel skills but low VBA skills. I have 1000+ .txt files that i need to convert to .xlsm files on a daily basis. I have been searching for options but have not had much luck. I have a R: drive that is holding all of these files i need a macro that can open and save as .xlsm...
  15. D

    Run these two macros only when the respective checkbox is checked

    Hello I have two macros (in "this workbook" object in VBA)for which I want to have two checkboxes in a worksheet (each for one macro) And I wanna to run these macro if their respective checkbox is selected in a worksheet. Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As...
  16. G

    MACRO to save file as MACRO enabled worksheet while filename will be pulled from a cell

    Hello, I have a macro created to save the file but for some reason .xlsm is being included in the actual name of the file. Can anyone figure out how I can prevent that from happening...
  17. E

    Save Sheet as .xlsm with Usable Macros

    Hello - I have a mastersheet and run a macro that saves the active sheet as a .xlsm file and creates a shape linked to a macro in this new file. All of that is working fine. My issue is that this macro was created in another book, so when the shape is clicked and the macro is called, there is no...
  18. J

    VBA Saving .xltm template as .xlsm

    I have searched but I have not found a solution that has worked. I continually get a "runtime error '1004' method 'saveas' of object '_workbook' failed" in my .xltm file's code while it is attempting to save it as a .xlsm. I have tried different variations and methods but nothing seems to...
  19. I

    Automatically creating links in one workbook to several workbooks

    Below is the modules I'm trying to get to work. I have added comments in blue where module has troubles. I cannot resolve the issue with having to open the file and also the issues with looping thru the next files. Your help would be greatly appreciated Sub Linkworkbooks() 'Linking...
  20. S

    Pull info from multiple workbooks to generate a report

    Hello all, I'm new to the forum and to VBA in general, I was hoping to get some assistance as I'm a complete novice. I have a folder on a Network drive that we house multiple .xlsm files in. The files itself are all the same and very basic. B2:B4 have title fields and C2:C19 have data fields...

Some videos you may like

This Week's Hot Topics

  • Date update overflow error ‘6’
    Dear MrExcel community, I have a project search & update & add & delete can do. There are 32 column and 5 of them is date. When I search date...
  • Highlight Row and Column on cell selection
    In the following I have some code I need modified to see if I can do the following: 1) Only have this work when selecting a cell inside a couple...
  • Need Numbers Inputted and Deleted
    Thanks for your help. Not sure if there is even an = equation for this. Please see attachment. If there is a solution, please respond with = So...
  • Worksheets(x).Select Error
    Hi, I am trying to select multiple sheets using the following code. [CODE=vba] Dim x As Integer ThisWorkbook.Worksheets(3).Select...
  • myFind Range not working
    Please can someone say why this myFindRng goes red in the code? [CODE=vba]Private Sub Model_Chose_Change() With ThisWorkbook.Worksheets("Job...
  • How to identify the last page break in a sheet
    How can I find the position of the last page break in my sheet? There may be multiple pages and I want to know how to find the position of the...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back