Posts by balla506

    Re: Saving with VBA


    I have done this and the path is correct. I literally just change xlsm to xls and it saves fine. As soon as I add the xlsm is when it fails. i have scoured forums to no avail. I have no idea what would cause this.

    Re: Saving with VBA


    I tried this but am still getting the same error. It works however if I change to .xls. I do not understand why .xlsm will not work.

    I am trying to just have this save a file with a given name. I keep getting a "Method 'SaveAs' of object'_Workbook' failed error". If I change ".xlsm" to ".xls" it will save in the right path but as soon as I add the m I get an error. Any thoughts?


    Hi,



    I am trying to make my macro more dynamic for a spreadsheet I am working on. I have this code which splits out worksheets (using the specific names of the worksheets-not dynamic) from a main workbook into template workbooks (which are basically just an empty workbook because I didn't know how else to do it) and then saves them using the paths below. I would like to make this more dynamic by splitting the different worksheets into new workbooks based on a key column in the hierarchy worksheet. Basically I have a list of accounts in column B with the file name they should be exported to in column A. There are about 30 accounts being split into 6 different region files. Also note that the same account might be listed multiple times in column A (needed to add multiple numbers for other lookup formulas in the worksheets) but that account worksheet will still only be going to one of the six region files and not to multiple regions. After these are copied to an individual file I would like to save it to a location on my computer. All files will go to this location. Any help on this is much appreciated. Thanks.













    Hi,


    I am having problems with this simple macro. All I am trying to do is select multiple ranges and then paste values for those ranges to get rid of the formulas. When I run this for some reason e1 is getting the value from A1. Thanks in advance for your help.




    Code
    Sub Test()
     
     Range("a1:c1, e1").Select
    Selection.Value = Selection.Value
    
    
    
    
     End Sub