Saving Macros As Global Addins Or Personal.xls Files
Jan 12, 2010
So i have a macro that i wrote that willclean up these datafeeds that i get. i want to be able to use them for each spreadsheet. So the first bit i tried was saving a personal.xls file in the xlstart folder in XP (MSE 2003) . That would automatically pull up but when i tried to run the macro on other worksheets i get the generic 400 error.
the next thing i tried was copying the macro to a module and adding function tags and taking out the sub tags. i then "saved" that in the addins folder then tried assiging my custom button to is through the macros prompt. When i gave the title box the absolute path to the addins folder with clean.xla cited it said it was invalid, so i tried saving it just as clean.xla expecting it to locate the file there anyway.
this far each time i try to run the macro globally it says it cant find the current sheetname!macroname So i must be missing a step somewhere... can anyone give advice, i have searched the forum and couldnt find a similar problem for solutions.
View 6 Replies
ADVERTISEMENT
Mar 7, 2008
How do you get macros to be universally accessible as functions without using the "personal.xls!" prefix? For instance I have the macro testmacro(), and if I do "personal.xls!testmacro(...)" it works fine, but if I just do "testmacro(...)" it gives me a "# NAME?" error. I have PERSONAL.xls (which is in the XLStart folder) as a hidden window. I tried unhiding and re-hiding it
View 5 Replies
View Related
Jan 27, 2010
I have never used or created a Macro before. I have worked out how to record one etc. What I would like to know is, is it possible to design a macro and whenever an excel workbook is opened it will list all the Macro's you have created so that you can just action on any sheet or work book.
View 8 Replies
View Related
Aug 13, 2014
I can't find it on my computer either, where is it hidden?
View 1 Replies
View Related
Jun 18, 2008
I wondered if I could pick your brains and hopefully get some answers to my problem. I have recently been using the Personal.xls worksheet to make all my Macros available to all open workbooks so that I don't have to cut and paste Macros each time I wanted to use them.
Now I know you sometimes have to make certain adjustments to Macros in order to make them work globally. I wondered if I could find out how to amend the codes below to make them work properly. Thanks.
The first code Macro below deletes all worksheets in a workbook except for the currently active sheet. However it no longer works.
View 14 Replies
View Related
Feb 27, 2009
Everytime I open Excel, the personal.xls file opens. What does one need to do to have the personal.xls file available as an option to save macros to, and have it open in the background only - not as an active file you can see?
View 2 Replies
View Related
Sep 6, 2013
I recently had a virus on my computer and had to replace it. I had a ton of macros saved in my Personal.xlsb workbook, so I exported those modules and have now imported them to the new Personal.xlsb file. Now for some reason those macros no longer work in other files. Most of them are basic, like I have a macro to paste values or paste formats, etc. but I have some others that are very complex. The macros work fine as long as I am in Personal.xlsb, but if I try to use them in another open workbook I get the "all macros may be disabled or the macro may not be available in this workbook" message. I am using Excel 07 and have verified that macros are enabled.
View 3 Replies
View Related
Mar 30, 2007
I am shortly to receive my new work laptop, but am aware that the new install of Excel (2003 v11, SP2) will naturally be without my custom 'cosmetic' settings.
By this, I mean that my choices of which toolbars are available, the order in which verious icons on the toolbars appear, the text tags under each icon, and of course my own user-defined icons (used to run my own macros).
I have some experience with .pip files and understand that these files are supposed to retain all your 'cosmetic' settings. But I've never been that sure a) how to use them b) if one can edit them directly c) whether copying them from my current computer to my new one will mean my settings are loaded etc. etc.
So, I wondered if anyone out there could give me some guidance on how I could successfully migrate my own 'cosmetic' preferences to my new install of Excel.
View 3 Replies
View Related
Sep 15, 2009
I have a large number of .txt files that are comma separated files (but not saved with the .csv extension) that I need to convert to files with the .csv extension.
Is there an easy way to do this for all files in a given folder? Ideally, the files don't even need to be opened as they are are quite large in size (70MB+) and there are a lot of them (500+).
View 9 Replies
View Related
Apr 23, 2009
I'd like to be able to just open the spreadsheet up and have the macros already saved in there. Is there a way to save these macros?
View 2 Replies
View Related
Mar 28, 2014
I need to copy several macros from the Personal Macro workbook to a new workbook that I need to take to another computer. I need to be able to run the macros on that computer. I can only record macros and make minor changes in the VB editor. I do not know VB code.
View 5 Replies
View Related
Sep 27, 2008
how to save my macros to a spread sheet? It seems every time I close my sheet(s) (after saving???) and come back to them later, my macros are gone??
View 9 Replies
View Related
Jan 20, 2010
The form is completed by the project leader, then they hit a Command Button and it's sent to the Senior Manager. After the Senior Manager looks at it and approves it, he then sends it on to Admin (me!) so the project can get set up on all of our systems.
We recently upgraded to Office 2007 (yes, we are a bit late!) and now the Macro that sends the form to Admin no longer works. An example of the error is as follows:
Cannot run the Macro "FY06-10 PROJECTS 19-Jan-10 08-32'EmailtoAdmin.EmailtoAdmin'. The macro may not be available in this workbook or all Macros may be disabled.
Here is the code that I use to send it to the Senior Manager:
Sub MailtoSM()
Dim FileExtStr As String
Dim FileFormatNum As Long
Dim Sourcewb As Workbook
Dim Destwb As Workbook
Dim TempFilePath As String
Dim TempFileName As String
With Application
.ScreenUpdating = False
.EnableEvents = False
End With
Set Sourcewb = ActiveWorkbook
ActiveSheet.Copy
Set Destwb = ActiveWorkbook
With Destwb
If Val(Application.Version) < 12 Then
FileExtStr = ".xls": FileFormatNum = -4143
Else.........
View 9 Replies
View Related
May 15, 2014
Whenever I save and close the attached, after selecting the NO on line 23, I lose all the buttons associated with my macros. If I save with everything expanded, no rows hidden, my buttons stay put.
View 1 Replies
View Related
Feb 17, 2009
I have a macros in my spreadsheet when I open it a number in the macros goes up 1 each time the worksheet is opened. I want to put this file on a server that can be accessed by various people. The problem I am getting is every time someone opens it from a different location with a different PC the number starts at 1 again. I want to keep the number going up 1 each time no matter who opens it.
View 4 Replies
View Related
Aug 26, 2013
How/ where to save macros. If I save a macro "normally" ("in this workbook") then it only applies to that one file, right? And I can't use it in any new files.
So what do I do if I want a macro I can use in "all" my Excel files?
And can I email a file containing a macro to a colleague, so he can work on the file, using the macro too?
I ask, because I've had trouble with this in the past (tho in MS Word) where I couldn't get the macro to be emailed along with the file...
Also - how can I get an .xls file with a macro to work in newer versions of Excel? And can I use Excel 2010 to save a file with a macro in an .xls format, so it can be opened in older Excel versions too?
View 3 Replies
View Related
Jun 6, 2012
I created an addin that puts a formula in a cell to make use of a UDF in the addin. It works fine.
But when I make changes to my addin, save it as new name, load the new addin (same as the old but with new code for other things) and then open the workbook that had the UDF working, it now changes from
=customUDFfunction(1,2,3)
to
='C:Documents and SettingshomeuserApplication DataMicrosoftAddInsAddinV123.xla'!customUDFfunction(1,2,3)
The code I'm using to create the formula in the cell is
Cells(x, y).Formula = "=customUDFfunction(1,2,3)"
I'm assuming that when I create the formula in the cell it gets tagged somehow with the addin name and location. How to just put the formula with keeping it specific to the addin that created it?
View 3 Replies
View Related
Sep 29, 2013
I have this code that generates excel pages as pdf files, but I can't get it to save it in its individual folders. For example, I have the sheet name as Brian Lin, I want to save the pdf into the folder called Brian Lin, then if I have the sheet name as Lilly Tran, the pdf should save into the folder called Lilly Tran. Here's my code. The code is one step short of what I want it to do, it saves in the folder right before the name folders.
Code:
Sub Macro1()
Dim wsh As Worksheet, vWshs
Dim sFolderName As String, set_Path As String, name As String, hwas As String, sname As String, swsname As String
vWshs = Array("Rates", "Inputs")
set_Path = "C:UsersJonathanDesktopFaFundInvoices" & hwas & ""
[Code]...
View 4 Replies
View Related
Apr 19, 2013
Whenever I make a change to any of my spreadsheets and click save, a backup is created in the same folder. A sample document is attached. Download it, make a change, then save it.
View 3 Replies
View Related
Nov 23, 2011
I'm saving information from excel 2010 in to a text file (txt), when doing this and opening up the txt file the below line is saving it with " at the start and at the end of the line.
:32A:110809GBP4,00
Is there any way when saving as a text file without the " pulling through at the start and at the end of the line?
View 2 Replies
View Related
Nov 22, 2013
I currently have 3 batch files that I would like to be able to update using VBA instead of manually adding the information to each one. My goal is to be able to use my excel file and when I add new lines I could then run the script to save and/or update each of the batch files. I would like to be able to add the new lines I added in excel to the end of the batch files. I use the batch files for automation purposes but I do not like the fact that I have to open each one and added the same lines three times. This is why I want to be able to update my excel file and then add those new lines to the batch file. An example of how to accomplish this task using VBA would be awesome.
View 2 Replies
View Related
Jun 13, 2007
I've already done a search and found this on ozgrid.com:
RunCodeOnAllXLSFiles
I'm sure it is what I need, but as a non-programmer, I'm having trouble using it.
I have 12 files, each with 14 tabs. Example:
File: Sector.xls
Tab 1: Region 1
Tab 2: Region 2
Tab 3: Region 3
The client now wants 14 files, each with 12 tabs:
File: Region 1.xls
Tab 1: Sector 1
Tab 2: Sector 2
Tab 3: Sector 3
My first attempt was to try a macro:
1) left click on tab
2) move or copy...
3) move selected sheets to book (File: Region 1.xls)
4) then go on to next tab...............
Now, this does loop through the requested files, I can see them open, then close. I'm guessing they are copying, but I take it that I need to have it paste, then go to the next? (The c:files is just generic, as the files are on our LAN, and I'm just paranoid. The "Erie St. Clair" are the actual names of the file, and the tabs).
View 2 Replies
View Related
Mar 24, 2014
I want two sheets of my Excel workbook to be saved as txt file. The name of the file is compiled of a fixed part ("TrialList" or "BlockList") and two values from another sheet (subject and session number):
[Code] ........
Now, saving the text files with the desired file names works perfectly. However, Excel decides to change the names of the sheets that have been saved as text files accordingly. This is something I want to prevent from happening, since a second loop of actions will end because of the unexpected sheet names...
View 1 Replies
View Related
Mar 3, 2013
I'm programing a VBA macro in Outlook 2007. I have added a button to the quick bar so when i open an email and push that button, a Excel file opens and i can input some data. Thing is, i need that if the opened email have some kind of attachment, when i push the button i want this attachement to be saved into a specific folder. Is that posssible?
View 2 Replies
View Related
Apr 11, 2013
I tried to use prtScrn button on the keyboard to capture the screen (excel UI) and then pasted it to excel then saved it. I tried to do the same thing on my friends machine and what surprises me is that the file size of two excel is different.
We use the same OS, excel version and the same machine specs.My saved excel file is around 7.91 mb in size while his is just around 235kb. Why is this like this?
Both pasted image have bmp as a format (default for excel when a you use print screen and directly paste it on excel.).
View 3 Replies
View Related
Jun 11, 2009
I would like my macro to prompt the user to select a folder for files to be either opened from or saved to during the running of my macro.
In fact, I need them to select two folders, one for this month and the other for last month.
I think I need to set the two folders as a variable but being fairly new to vba I'm not quite sure how to do this.
View 9 Replies
View Related
Jun 16, 2009
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 71 bytes) in /home/eforum/public_html/search.php on line 1155. I have following macro, what worked just fine in 2003. Now I'm working with 2007 and I can't set up the Microsoft Visual Basic for Applications Extensibility library. Here's the
View 2 Replies
View Related
Jul 23, 2013
I have the following code which edits an excel file and saves it in a different format, I think want the code to take this newly saved file and open it in an external application (Softplot) and then save it through this new application.
VB:
Sub FormatMacro1a(ws As Worksheet)
ws.Copy
Rows(1).Delete
Columns("D:E").Cut Destination:=Columns("J:K")
Columns("F:K").Cut Destination:=Columns("D:I")
Range("E1:E201").Value = "0"
[Code] .....
As it stands I have the file saving in a new format and I can open a specific file in softplot through VBA however where I am getting stuck is opening my newly saved file and then saving it.
I have tried the following :
VB:
Path = "C:Program FilesSoftPlot-8softplot.exe"
File = "ActiveWorkbook"
View 3 Replies
View Related
Jun 21, 2009
I have a worksheet in my workbook that contains data for 25 different airfoils, each one in a cell space of 3 columns and 50 rows.
In order to do some analysis on these airfoils, I need to save each 3x50 as separate text file to define input for analysis code.
How can I do this in VB in one macro?
View 9 Replies
View Related
May 11, 2008
I load an text file into an excel sheet and after some eventually changes I save (overwrite) it back into the text file again. Now the text file has become a file with 50 pages (49 empty pages). How can I avoid this or how can I set an EOF when no more written lines follows. The code for saving the excel sheet is this:
Application. ScreenUpdating = False
Application.DisplayAlerts = False
Sheets(wsImport).Select
Sheets(wsImport).copy
ActiveWorkbook.SaveAs FileName:=WorkFolder & WorkFile, _
FileFormat:=xlText, CreateBackup:=False
ActiveWorkbook.Close
'ThisWorkbook.Activate
Sheets(wsKwartaal).Activate
View 6 Replies
View Related