Macros Feature, And Hit "record" But Didn't Save Anything
Jun 22, 2007
I started playing around with the macros feature, and hit "record" but didn't save anything. Now, whenever I try to close my sheet, it gives the "save changes" prompt, even when nothing's changed. There are no saved macros to delete...no idea what I did or how to get rid of it. I tried copying the cells to a new worksheet, and the new one gives the save prompt as well.
I am trying to disable the save and save as function using a macro, i know that this in its self is quite simple but i am making VBA create a new workbook and i want this (nameless) workbook to have the save feature disabled.
i have a master workbook. it gets used daily as a template and saved as another file name. the file name is generated by 5 cells that each contain different data (date, street, town, state). is it possible when i hit the save or save as button/icon, for a file name to be automatically generated from the cells i have data in??
PostPosted: Wed Oct 15, 2003 5:12 pm Post subject: Re: change default saveas name for new file w/o saving Okay, so you want to create a workbook via code, prompt the user for a SaveAs name, then save this workbook?
Sub CreateAndSave() Dim wb As Workbook Dim SaveFileName As Variant
Set wb = Workbooks.Add
ChDrive "C" ChDir "C:VBA Code"
SaveFileName = Application.GetSaveAsFilename("It is a new file.xls", _ "Microsoft Excel Workbook (*.xls),*.xls")
On Error Resume Next If SaveFileName False Then wb.SaveAs FileName:=SaveFileName........................
I have a workbook that has a list of customer numbers in column A and the type of customer they are in column B. Now, there is a different worksheet for each customer type (about 12) that summarizes data for me in a printable format. Right now, if I wanted customer number 1's data, I would go to his corresponding customer type worksheet and type in his customer number in cell P1 and the sheet would update with his data, and then I'd PDF the worksheet.
Is there any way I could get a macros that would create a folder of PDF's for every customer number rather than going one by one?? Basically the macros would have to look up the customer number and customer type, go to the corresponding customer type worksheet, and print it to PDF for every customer. Is this doable?
I have recorded (i.e. manually as opposed to writing VBA code) a number of macros to perform a routine, however they do not work when I change the filename.
Could someone please advise on how to edit these macros (which reference a specific filename) so that they work when the file name is changed. The macros copy and paste values from different worksheets and then run another set of macros. However all macros and worksheets are located within one excel file
I have excel 2007 and I want to record a macro. I have enabled all macros via the Trust Center settings and have even saved the current workbook (created from scratch in 2007) to a macro-enabled version.
But when I click on the 'developer' toolbar, 'record macro' is grayed out.
I think the title pretty much says it all... Now I have a file I can't send to anyone to do anything with... I've googled a few things but I've found nothing to work with... It was only a few hours worth of work but this seems ridiculous...
I have a "template" that runs a few processes and then saves the results in a new workbook...is there any way that I can have my vba code save the workbook without saving any of the vba code in the new workbook?
I would also like to exclude one of the worksheets from the new workbook if possible (but the first part is more important).
In the attached file, the "importer.xls" is the file that has the ADO code and range of area for the data to be pasted, while the "Data to be imported.xls" is the source data that i want to copy which is in range "B1:D5" from each sheet "nightshift" & "dayshift". If you run the code, if would only copy partial of the data, could anyone plz fix the problem for me
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?
would like to save a spreadsheet with the contents of a cell as the name. My problem is that I have several macros in the workbook and if I change the name of the file when I save, it won't run the macros when I reopen because the filename has changed. It presents me with an error saying it can't find the macro.
I have several workbooks that use macros from my personal macro library (MyExcelAddIns.xlam).
Some of these, especially new ones, get an error message every time I save them: "Privacy warning: This document contains macros, ActiveX controls, ... These may contain information that cannot be removed by the Document Inspector."
Then after I save it once or twice, the message goes away. Why am I getting this message? Why only sometimes? What can I do to get rid of it entirely?
I have a complex sorting macro with userforms & Modules. Works great! Now I need to save the final Worksheet without the macros. The final step to my project is a Application SaveAs. Can I add a delete-all-macros step when the user clicks the Save As button which would create a new workbook with the finished worksheet and NO macros?
if there was a way to disable mcros but I think now I should have pursued the option of saving data to new workbook without transfering the existing formulas or macros. I really think I should attach the sheet I have thus far so I can convey what I am trying to accomplish. Anyone interested, please let me know and I will forward the sheet. I am unsure how to do this any other way. I found some code that would claim to do this but I have so many things going on already in this sheet I can't figure out how to incorporate the new code to work properly. Here is the original thread for reference [url]
I have a macros ( code inserted ) as you can see in my code the macros save the workbook in any file name you chose just by changing the any filename option.
I would like this to be changed so that it saves based on a cell reference, say i has a name in lets say B10 i would like it to save as the name in B10.
Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.DisplayAlerts = False Dim bk1 As Workbook Dim bk As Workbook Dim myfilename As String
I changed the code below to add an extra column(E) this worked. However it does not keep the formatting from the top row in column E, How can i change the code to column E to keep the top row formatting ??
Also i added a list to cell A2, but this moves down, I would like to have the selected data move down but the list stays in cell A2, Was this possible ?
I seek advice on using the value of NOW() as a record ID in an address book program. Question #1: Do Excel developers often use a record ID? Question #2: What record ID schemes are fequently employed besides date/time? I have decided to create an Excel address book as an exercise to increase my knowledge of VBA, and also as a useful application for work.
I realize that a record ID is not essential in Excel in the way that it is essential in Access, but I feel the need to have some unique ID associated with each address, so that I may have different worksheets, with data related to a given Contact, sort and manipulate it, if necessary, but have the record ID as a way to restore the relationship of rows to a given Contact, and also, as a handy way to examine the data in the date/time sequence in which it was entered. I have experimented with the following code, to assure myself that I can access the number returned by the NOW() function, manipulate it as a string, and format in various ways if necessary.
Dim n As Double n = Now() sn = Str(n) p = InStr(sn, ".") first = Left(sn, (p - 1)) l = Len(sn) d = l - p S = Mid(sn, (p + 1), d)....................
I am creating an asset management sheet. For the formula I am trying to work out there uses 3 fields : ID, start date, and end date.
What I want to do is be able to show if the ID is duplicated within another record with an overlapping date. So an item is flagged if it is in the list within the same dates as another record. I tried a few countif formulas but with no success.. I may just be approaching the problem incorrectly though.
I am looking to create a macro that will create a new sheet when data is added on a summary sheet. Example.
1. Summary sheet called "Variations" contains columns that will contain the information needed for new sheet (Columns A to D)
2. When data is entered on "Variations" sheet: Column B, then macro automatically creates new sheet renamed to e.g. VO1 (Number used on "Variations" tab) and is a copy of "Master" tab.
3. Data entered in Column A to D on "Variations" tab is automatically entered onto new sheet created (e.g VO1). Shown is blue on attached file. Additional data is updated on "VO1" sheet and this then links back to "Variations" tab
I have several groups of data separated by a couple of blank lines. For each group of data I would like to sum the rows in column F. I do not want to use the subtotal feature but rather the autosum feature for each section. It is important that the formula is actually entered so if I add additional rows of data the formula will keep calculating. So at the end of each data the formula is as follows =sum()
Does VB have the WEEKNUM feature ?, I can use WEEKNUM in an Excel sheet ok, but it is not recognised in VB ... I have installed both the Analysis tool packs, the one for VB as well.
This problem seemed to revolve around "digital signing" with further macro changes done from a different machine (without the proper certificate). Excel warns of the problem and then "unsigns" the project.
I've got a problem with spreadsheets that I've been working on. Now, when I tell it to record a macro, I get the macro name, shortcut assignment dialog box and then an error "Unable to record." After "Ok"ing that dialog box, the normal recording macro dialog comes up. Also, lo and behold, there will not be a macro recorded.
I've got no protected cells or sheets and it doesn't matter what security level is set. It is a "signed" macro but I can take off the signature and still have the problem. I checked for "Help - About" for deactivated modules and there was none.
I want to use the "linked image" feature.This works well but when I don't know how to use it with a named cell (ie : "=$A$1:abcd" where abcd is a cell that I named).