Over 1 million tech questions and answers.

Unable to record macro error in EXCEL >:-(

Q: Unable to record macro error in EXCEL >:-(

I have a new Dell laptop with Windows ME & Office XP. When I go to record a new macro, I can enter the description and other info, but when I click 'OK' to start recording the Macro, I get an "Unable to record" error message. The error message has no help button or details button, just an 'OK' button. I have everything for Office installed.....Please help, thanks

Preferred Solution: Unable to record macro error in EXCEL >:-(

I recommend downloading and running Reimage. It's a computer repair tool that has been proven to identify and fix many Windows problems with a high level of success.

I've used it in the past to identify and fix everything from blue screens (BSOD's), ActiveX errors, corrupt files and processes, dll/exe/sys errors, recover lost memory, Windows update problems, defragging, malware removal etc.

You can download it direct from this link http://downloadreimage.com/download.php. (This link will automatically start a download of Reimage that you can save to your computer.)

A: Unable to record macro error in EXCEL >:-(

Read other 7 answers

I am using Excel 97 with Vista Business. When I try to record a macro on a new worksheet I get the message "Unable to Record Macro". If, on the other hand, I load a file created in Excel 97 while I was using Windows XP, I can not only run the existing macros but record new ones.

Would I be correct in assuming that Excel 97 is not fully compatible with Vista or does someone have a solution?

A:Excel 97 Unable to Record Macro

Read other 6 answers

Can anyone help?

I've been asked to look at an excel file at work and they want a button that when clicked will put a new row at the bottom of the current records (i.e. the next empty row) and autopopulates the first cell in the row with a unique number (preferably sequential) so this can be used as an identifier for that particular record.

any help would be greatly appreciated!

A:Solved: excel macro new record that is automatically numbered

Read other 16 answers

Since my company has upgraded to Windows 7 I now have a problem recording Macros in Excel. I find that the commands SAVE and SAVE AS do not record any more.
Also when stepping through (F8) a macro, when it gets to a SAVE command it just runs to the end unless I put a Breakpoint after that command. Any ideas??

A:Excel Macro recorder will not record a save command

Hi, could you be a little more specific in what you mean with A macro will not record a Save command?
Here a two mcros recorde with the recorder

Sub testSave()
' testSave Macro

ChDir "G:\_Forii\11-November"
ActiveWorkbook.SaveAs Filename:="G:\_Forii\11-November\Testing Save.xlsm", _
FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
End Sub
Sub TestSave2()
' TestSave2 Macro

End Sub

The first made it Save As because it was a new file and the second is recording a save action.

Also Windows 7 (you dit not tell us which version of Excel, my version is 2010)

Read other 3 answers

Excel and Word: error message when attempting to record a macro "unable to record"

tried: Repair
Uninstall and reinstall "Office"
searching MS support
searching internet
not comfortable working in "Register"

Tech Support Guy System Info Utility version
OS Version: Microsoft Windows 7 Home Premium, Service Pack 1, 32 bit
Processor: Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, x64 Family 6 Model 15 Stepping 11
Processor Count: 4
RAM: 3326 Mb
Graphics Card: ATI Radeon HD 2600 XT, 256 Mb
Hard Drives: C: Total - 336778 MB, Free - 207914 MB; D: Total - 10239 MB, Free - 5739 MB; G: Total - 953867 MB, Free - 548088 MB;
Motherboard: Dell Inc., 0FM586
Antivirus: ZoneAlarm Extreme Security Antivirus, Updated and Enabled

A:Macro "unable to record"

A seach with Google gave me this link

Maybe it could help you too.
Good luck

Read other 1 answers

I created a macro for one of my co-wokers that:

Refreshes data using MS Query to pull data from an Access database.
It then formats fonts and headers and stuff correctly on that worksheet.
It then creates a pivot table on a new sheet (using the wizard) based on this refreshed info (it's actually based on a cell range 8 columns wide and 10,000 rows long excluding the header, just in case we get a huge number of claims on one ship).
It then formats the pivot table correctly and renames the worksheet.
Finally, it moves the worksheet to where it should be (still in same workbook).

This worked the first time, and still works now, except for the last part, where it moves the sheet. I now receive an error:

Run-time error '1004':
Application-defined or object-defined error.

I hit Debug to see where the problem was (I know very little VB) and this is what was there. The Bold part is what was highlighted in yellow in the VB window:

Sub Refresh_Pivot()
' Refresh_Pivot Macro
' Macro recorded 04/09/01 by Liz Clark
Selection.QueryTable.Refresh BackgroundQuery:=False
With Selection.Font
.Name = "Arial"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Selection.Font.ColorIndex = 11
With Selection.Font
.Name = "Times New Roman"
.Size... Read more

A:Excel 97 macro error

Read other 6 answers

=IF(ISERROR(100),"NA",100) appearing in Excel 2007 shortcut key macro?

First, my disclaimer is that I am not familiar with Excel or VB!​

That being said, one of my users is getting an error when running a macro in Excel 2007 from his personal.xlsm.​
The macro is a simple color change which we have re-recorded several times but when he attempts to run the macro with a shortcut key the field populates with =IF(ISERROR(100),"NA",100) where 100 was the test value of the original cell. If you run the macro from the menu it works correctly. ​
Macro is:​
Sub Macro1()
' Macro1 Macro
' Keyboard Shortcut: Ctrl+Shift+E
With Selection.Font
.Color = -4165632
.TintAndShade = 0
End With
End Sub​
Any suggestions are greatly appreciated. ​


Read other answers

Hi there,
I've cobbled below code together (I'm game but probably not even a pedestrian in VBA, maybe more of a snail) to take some information from an Excel sheet and put it into an e-mail. I also want the active workbook attached to the e-mail and if possible another file with the same name but in pdf (haven't looked at that yet).

The ErrorCatch says it's an object or applications driven error.

I'm not sure about this line: .Attachments.Add ActiveWorkbook.FullName but really have no clue where the problem is.

Any help would be greatly appreciated. Thanks.


Function GetBoiler(ByVal sFile As String) As String
'Dick Kusleika
Dim fso As Object
Dim ts As Object
Set fso = CreateObject("Scripting.FileSystemObject")
Set ts = fso.GetFile(sFile).OpenAsTextStream(1, -2)
GetBoiler = ts.readall
End Function

Sub Mail_small_Text_Outlook()
'Working in Office 2000-2010

Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Dim SigString As String
Dim Signature As String

On Error GoTo Errorcatch
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)

strbody = "Hi Leon" & vbNewLine & vbNewLine & _
"" & vbNewLine & _
"Attached invoice for " & Cells(C14) & ".Can you please approve for payment?" & vbNewLine & _
"Supplier: " & Cells(E43) & vbNewLine & _
"Invoice Number:&quo... Read more

A:Solved: Error 400 in Excel Macro

Read other 14 answers

Hi there,

I'm trying to do a simple macro that opens an Excel template. Copies fields from a row in an open Excel sheet to the newly opened template. Prints the template. Puts a date into that row. Stop.

I got an error at r = ActiveCell.Row until I deleted Option Explicit. Also got an error at the copies code that I turned into text. Now I get a Compile Error: Named argument not found at IgnorePrintAreas:=False

I tried to delete that line but then I get an error for the entire print code.

Does anybody know where the error sits? I'm trying to print to the default printer.

Thanks, Christine

Sub ProcessServiceInvoice()
Dim BkSrc As Worksheet, BkDest As Worksheet
Dim FilePath As String, FileName As String
Dim blnOpened As Boolean
Dim DestBook As Workbook
'Set Source Workbook
Set BkSrc = Workbooks("D:\Documents and Settings\305015724\My Documents\admin\Accounts\2010\_Service_Invoices_2010.xls")

r = ActiveCell.Row

'Open Template
Workbooks.Open FileName:="D:\Documents and Settings\305015724\My Documents\Templates\AP coding template_General_NZL.xlt"
Set BkDest = ActiveWorkbook
'ActiveWorkbook.SaveAs FileName:=BkSrc.Cells(r, 3).Value
'Copied from Zack Baresse, I think I will need this
'Call ToggleEvents(False)
'Set ws = ThisWorkbook.Sheets("CodingTemplate")
'If WbOpen(BkDest) = True Then
'Set wkb = Workbooks(FileName)
'blnOpened = False
'If Right(FilePath, 1) <> App... Read more

A:Compile Error in Excel VBA macro

I have worked a bit more on this and above problems seem to be resolved. But, big but, I now get a run-time error '9'. Subscript out of range.

I looked it up and it says it means one of the workbooks isn't open but I'm working with 2 books, one which I have open to start with and the other one I do open.

Any ideas? Thanks, Christine

Sub ToggleEvents(blnState As Boolean)
'Originally written by firefytr
With Application
.DisplayAlerts = blnState
.EnableEvents = blnState
.ScreenUpdating = blnState
If blnState Then .CutCopyMode = False
If blnState Then .StatusBar = False
End With
End Sub

Function WbOpen(wbName As String) As Boolean
'Originally found written by Jake Marx
On Error Resume Next
WbOpen = Len(Workbooks(wbName).Name)
End Function
Sub ProcessServiceInvoice()
Dim BkSrc As Worksheet, BkDest As Worksheet
Dim FilePath As String, FileName As String
Dim blnOpened As Boolean
Dim DestBook As Workbook
'Set Source Workbook
Set BkSrc = Workbooks("D:\Documents and Settings\305015724\My Documents\admin\Accounts\2010\_Service_Invoices_2010.xls")

r = ActiveCell.Row

'Open Template
Workbooks.Open FileName:="D:\Documents and Settings\305015724\My Documents\Templates\AP coding template_General_NZL.xlt"
Set BkDest = ActiveWorkbook
'Copied from Zack Baresse, I think I will need this
Call ToggleEvents(False)
Set ws = ThisWorkbook.Sheets("CodingTemplate")
... Read more

Read other 1 answers

This post is related to an earlier one, which has now been solved and closed:http://forums.techguy.org/business-applications/955009-excel-2007-lookup-formula.html. The macro outlined in this thread works fine as long as there are 4 values in each row the macro references. If there are less than 4 values the formula errors when trying to return the

value. Could somebody please edit the macro so that if it causes an error due to too few values, that it will then break out of the code instead of keep running? The ideal situation would be that it outputs any values it finds, and skips past and carries on if the function errors.

A:Solved: Excel Macro Error

No problem - all sorted now A bit of out of the box thinking was all that was needed!

Read other 2 answers

I can run this macro on my own machine but when I transfer it to another computer, I get the following error: Run Time error 1004 Cannot open PivotTable source file 'headcount by area' - any ideas what's wrong??!

A:Error running a macro in Excel

Read other 6 answers

I have a spreadsheet with macros that I use for work which works flawlessly on Win XP, but when you try to run the macros on a Vista/7 machine it gives this error:

"Compile error: Can't find project or library"

It seems to be hanging up at "Trim" on this line:

NewSheet = Trim(InputBox(Mesg, Title))

Our tech support seems lost, any help?


Read other answers


Every macro enabled file that I try to use on my computer gives me the same error: Runtime error 9 subscript out of range.

I get this error on files that work on other computers, including files I wrote on my computer, they don't work anymore and the all give me the same error.

Even writing a very simple macro I get this error, for example:

Sub MyInfo()
Workbooks("CropTool").Worksheets("RawData").Range("A1").Cells(2,4) = "hi"
End Sub

I have checked about 10 times to make sure that the workbook is indeed called CropTool, and the worksheet is called RawData.

This error has nothing to do with what I write in the module....

Please help.

A:Solved: excel 2007 macro error

Read other 7 answers

The following macro works perfectly on the Mac I have built it on. But when I transfer it to my server - or try to run it on a Windows machine - it returns a 400 error.

Does anybody know why?

Sub NextInvoice()
Range("K9").Value = Range("K9").Value + 1
Range("F7:F11").Value = "Name/Address"
Range("F29:K30").Value = "Personal message..."
End Sub
Sub SaveInvWithNewName()
Dim NewFN As Variant
' Copy Invoice to a new workbook
NewFN = Range("B3").Value
ActiveWorkbook.SaveAs ActiveWorkbook.Path + "\" + NewFN, FileFormat:=xlOpenXMLWorkbook
ActiveWorkbook.Close SaveChanges:=True
End Sub

A:Solved: Problem with an excel macro 400 error

Read other 16 answers


I have a bix excel file with lots of macros written in it. While running a particular macro, I get "Subscript Out of Range" error in some specific rows.

The same workbook when used by others work well.

Can anyone help?

Read other answers

When I try to compile the Excel Macro, I get the following error message:

"Compile error: Procedure too large"

A:Solved: Excel Macro - Error Message

Read other 15 answers

I have a monthly report I run which outputs single sheet "Invoices" from my workbook that is populated by a months worth of sales. The macro goes through a list of names, pulls the details for that person, populates the pivot table on the invoice,
then saves as both a single excel sheet and a pdf. up until today it has worked fine. the code is, and the error occurs when it reaches the date line. It states "Compile error, can't find project or library":
Sub Save_Sheets_To_New_Books() 'INVOICES
Const strWbPath As String = "D:\Accounts\EA Letters\2020 09 September\"
Dim strDate As String 'todays date
'save the sheets to new books within the active folder and print them
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
strDate = Format(Date, "yyyy.mm.dd")     '(Date, "yyyy.mm.dd")
THIS IS WHERE THE ERROR OCCURS the word DATE is highlighted
Call DeleteNamedRanges
Call PrintAreaAndPasteSpecial
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, FileName:=strWbPath & Name_of_Artist & "_" & strDate & ".pdf" _
        , Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
        :=False, OpenAfterPublish:=False         
ActiveWorkbook.SaveAs FileName:=strWbPath & Name_of_Artist & "_&quo... Read more

Read other answers

I have attached a spreadsheet. The first tab (Setup) has buttons 1,2,3,4,5. The purpose of these buttons is to have different years investments. I have a tab (Sheet1) that is hidden in the spreadhseet. Each macro unhides, then changes about 3 formulas on the Investment Analysis Tool tab, simply changing the cell reference. Only it does't ' change. It errors out with the above error. I've never see anything like this happen! Thanks in advance for the help.

A:Solved: Excel: Run-time Error 1004 During Macro

Monty75, I am sorry but the spreadsheet that you posted does not have any buttons visible.
The Code is there and I have looked at and run it and the problem is that the Code is not on Sheets("Investment Analysis Tool").Select
This is a quirk of Excel, You need to put activesheet. in from of your "Range selection" like so
ActiveCell.FormulaR1C1 = "=Sheet1!R[31]C[-2]"

Read other 3 answers

Hey everyone,
So I used this code to copy a range of cells from multiple workbooks and paste it into one workbook. It used to work fine but now it gives me the 400 error. I've been adding files to the directory that it pull the files from and it was working fine, but all of a sudden it's causing this error. Can someone please help me out?

Dim xcell As Range
Dim ycell As Range
Dim sheetname As String
Dim wblist() As String
Dim i As Integer
Dim wbname As String
Dim j As Integer

i = 0
j = 0
FolderName = "C:\Documents and Settings\s.k\Desktop\CRs\LOG"
wbname = Dir(FolderName & "\" & "*.xls")

Application.ScreenUpdating = False

Do While wbname <> ""

i = i + 1
ReDim Preserve wblist(1 To i)
wblist(i) = wbname
wbname = Dir
Set ycell = Range(Cells(i + 3, 2), Cells(i + 2, 28))
Set xcell = Range(Cells(2, 3), Cells(2, 28))
sheetname = "loging form"

ycell.Formula = "=" & "'" & FolderName & "\[" & wblist(i) & "]" _
& sheetname & "'!" & xcell.Address

Do While j < 100
Cells(j + 3, 1).Select
ActiveCell.FormulaR1C1 = "=LEFT(RC[6],4)"
'ActiveCell.FormulaR1C1 = "=LEFT[RC[6],4]"

Cells(3 + j, 1) = Val(Cells(3 + j, 1))
Cells(3 + j, 2).Select
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC[-1],'[CR Status.xlsx]Sheet1'!R3C1:R189C3,3,FALSE)"

If Cells(3 + j, 1).Value = 0 Then
Cel... Read more

A:Excel VBA Macro Problem - Code used to work, now 400 error

Read other 7 answers

Hi All,

I included the macro that was developed last week for this "AIR Log." However, the creator is on leave and I only know how to read and interpret...thus giving me an error that I cannot fix:
I would also like to do the following...

In Column O have a formula... =CONCATENATE(Lxx,Mxx,Nxx)
Hide columns L-N
Remove Table Style
Set font to Arial; size to 9; Make sure all text is Middle & Center Aligned.
Row 1 has a fill color: Blue, Accent 1, Darker 25%
Option Explicit

Sub oooFormatAIRLog()

Sheets(1).Name = "AIRLog"
Columns("P:Q").Delete Shift:=xlToLeft
ActiveWorkbook.Worksheets("AIRLog").ListObjects("Table_AIRLog"). _
ActiveWorkbook.Worksheets("AIRLog").ListObjects("Table_AIRLog"). _
Sort.SortFields.Add Key:=Range("Table_AIRLog[Risk/Issue/Action Item?]") _
, SortOn:=xlSortOnValues, Order:=xlAscending, CustomOrder:= _
"Issue,Risk,Action Item", DataOption:=xlSortNormal
ActiveWorkbook.Worksheets("AIRLog").ListObjects("Table_AIRLog"). _
Sort.SortFields.Add Key:=Range("Table_AIRLog[Criticality]"), SortOn:= _
xlSortOnValues, Order:=xlAscending, CustomOrder:="High,Medium,Low", _
ActiveWorkbook.Worksheets("AIRLog").ListObjects("Table_AIRLog"). _
Sort.SortFields.Add Key:=Range("Table_AIRLog[Due Date]&quo... Read more

A:Solved: Excel Macro: Run-time error '1004'

With the sheet and the charts it's a needle in a haystack.
The error messag is that you're adressing a range or sheet which is either misspelt or hidden or non existant.
You will have to go through the macro step by step.
Open the VBA editor, loop for the macro select it and press F8 so the code will be executed line by line and it will stop when the error occurs.
Check that line and see if what it addresses exists.
Trouble shooting takes time an patience.

Good luck

Read other 2 answers

I have a macro I wrote in excel 2003 (by recording small steps as a chain of macros), I just upgraded to a new machine and Office 2010.

When I try and run the macro it comes back with error message "Run time error 438, Object doesn't support this property or method."

When I run debug the code line that is flagged is:

Selection.End(X1 to Left).Select

Are there any commands or options which have changed between 2003 and 2010 and is there a conversion list anywhere?

George intermediate user running Windows 7 64bit, Office 2010

A:Solved: Excel macro 2003 to 2010 error 438

Read other 16 answers

Hi Folks

I have an Excel 2007 .XLSM file containing the following macro that performs a Fourier analysis
Sub Macro1()
Application.Run "ATPVBAEN.XLAM!Fourier", ActiveSheet.Range("$C$1:$C$4"), ActiveSheet.Range("$E$1"), False, False
End Sub

The macro works fine when I launch the XLSM file manually. However, if I launch the file from a VB program (in Microsoft Access 2007), I get the following message:

'Cannot launch the macro ". The macro may not be available in this workbook or macros may be disabled'

The code I use to open the workbook and relevant add-ins:
Set objXL = CreateObject("Excel.application")
Set objBook = objXL.Workbooks.Open(MyPath & "Template1.xlsm")
objXL.Workbooks.Open (objXL.Application.LibraryPath & "ANALYSISATPVBAEN.XLAM")
objXL.Workbooks.Open (objXL.Application.LibraryPath & "ANALYSISANALYS32.XLL")
objXL.RegisterXLL "Analys32.xll"
I then go to the worksheet and try to manually execute macro1 but I get the above error message. Note that:
"enable all macros" is set in Developer/Macro Security
"trust Access to the VBA etc." is turned on. in in Developer/Macro Security
I tried placing the macro in my PERSONAL.XLSB file to no avail (not sure this was worth it, but I found a suggestion to that effect on another forum)
I tried executing macro1 from the VBA program as follows but got the same error:
Cod... Read more

A:Solved: Macro Error when launching Excel as OLE Automation Object

found the answer on:

I had omitted the auto open macro. Statement:

objXL.Workbooks("atpvbaen.xlam").RunAutoMacros 1

Read other 1 answers

I am using the MSN Stock Quote addin with MS Excel 2003. Prior knowledge of this should not be necessary, but I just thought I'd provide full context to my issue. I wrote a macro that essentially records daily stock prices. Because I don't want to store old quotes into perpetuity, i need to ensure that the update quotes button has been hit. I use sendkey() to accomplish this, and then the macro copies the quotes and pastes them elsewhere. My main goal is to have the task scheduler open this file daily so i dont ever have to think about this again, and i'm so close. Essentially my problem is that it takes a few seconds after the update button is hit for the add-in to fetch the new prices from the internet, and this process appears to be delayed until the macro is finished. This is a problem because the macro ends up recording un-updated quotes. I have tried the Application.Wait procedure, and I've tried time consuming loops, do while loops, etc. All of these approaches result in the same thing: Can someone please help me with this? I'm too lazy to hand update this spreadsheet every trading day for the rest of my life (or until i quit). Thank you in advance!

A:Excel Macro - Allow cells to update query before macro completes

Can't you just put the update macro code in a module of it's own and call it from the main macro?


Read other 1 answers

I am working in Excel 2003, within XP and have the following situation.

For approximately 18 months, I have been running the macro listed below without issue. Now, for no apparent reason, the macro fails to execute in its entirety. When executing the macro from within Excel, the execution starts and proceeds a few lines and then just stops. No error, no warning, nothing, the macro just stops.

If I open up the Visual Basic editor screen from within Excel and attempt to execute the macro with F5 or step through line by line with F8, execution will proceed to the end of the Selection.TextToColumns command line, and the insertion point goes back to the start of this same command once executed. If F8 is pressed a second time, the insertion point goes all the way back to the Sub line at line 1 of the macro and tries to run the macro again. The behaviour is consistent, and no error code or indication occurs. The code has not changed.

If I break up the macro into a series of smaller macros at each error point, and run them sequentially, I get the desired outcome.

I have tried renaming, copying and pasting the text into different macro files, exporting the macro and re-importing into different worksheets (this one is currently sitting in personal.xls which is still sitting in my /xlstart subfolder.

I have 8 similar macros that now all do the same thing - very puzzling.

Would welcome any suggestions you may have. Thanks all.

ps. for all you real VBA folks out there, no this isn&... Read more

A:Solved: Excel 2003 macro halts during execution - no error message

Read other 7 answers

I've been trying to implement a macro to apply a defined chart format to every selected chart. I've been using a post from this forum a few years back http://forums.techguy.org/business-applications/823459-macro-format-charts.html to help, and it's working great for a single chart. However, I'd like to enable it to run across several selected charts at once, and that is giving me problems that I can't get my head around.

I'm trying to use this code to run through the objects in the selection:

Sub ReFormatSelectedCharts()

Dim ThisChartObj As ChartObject

Dim ThisType As String
ThisType = TypeName(Selection)

Select Case ThisType

Case "DrawingObjects"

For Each ThisChartObj In Selection

Call FormatThisChart(ThisChartObj)

Next ThisChartObj

...Click to expand...

However, it gives me a type mismatch when I try to use it. I've investigated by implementing the following code instead of the for each loop:

X = Selection.Count
ReDim arrCharts(1 To X)
For i = 1 To Selection.Count
arrCharts(i) = Selection(i).Name
Debug.Print arrCharts(i)
Next iClick to expand...

Interestingly, it seems that the second chart in the selection is being treated as a button by Excel - so in the debug output in the case with three charts I'll see something like:

Chart 10
Button 1
Chart 5Click to expand...

while for two charts it'll just be
Chart 10
Button 1Click to expand...

I've tried it with different pairs and sets of chart... Read more

Read other answers

I am trying to record a macro for a Microsoft 4000 keyboard. I want the macro to type my email address. The software records the macro just fine EXCEPT it will not record the @ sign. I thought the first time I recorded the macro it worked fine for a few days. Then it started dropping the first letter of my email address and it also quit typing the @ symbol and just typed a "2". I tried deleting the macro and re-recording it. Nope. Then I tried removing the software and re-installing. Nope. So now I am even wondering if it ever worked correctly. Maybe I just imagined it.

What am I doing wrong? I type the macro per instructions and do the normal Shift + 2 to get the @ symbol. It just does not work. I figured out how to get it to not drop the first letter of my email. I add an extra shift at the beginning of the macro. But I cannot figure out how to get an "@" to record. Actually it will not record any of the uppercase numeral keys.

Suggestions? Thanks

Read other answers

I am not for sure if I need to record a macro or just build a template. I need to have a document form available at the touch of a couple of keys. Can anyone help me on which one I would need and then how I could do either one, PLEASE.

A:How do I record a macro in Word98?

If you can give me an good example, I can tell you the steps you need to take whether it's a template, a macro, or both.

Basically, a template is a file you can pull up (File-New and choose the template) that you would then customize the information, like a form letter into which you put the person's name or you create an invoice.

A macro is really a series of tasks that you can perform within one specific document or you can have the macro available for use in all of your documents. If you're constantly performing that series of tasks, you record it and then just run the macro any time you want. For this, I've got a document in Word that explains exactly how to record a macro, pictures and all. Email me at [email protected] and ask for the Record Macro doc.

Oh, and are you sure you have Word 98? Open Word and hit the Help dropdown menu and then hit About Microsoft Word. Word 98 is for Macs, not IBMs.

Read other 3 answers

HiMy lenovo z51-70 does not burn dvds. I tried various discs: DVD-R and DVD+R.Recently when using DVD+R discs, windows shows error message during burning of new disc saying ' speed of recording is too fast or too slow for used disc' use another disc and try again.Can you advise how to fix this, please?My dvd drive is useless now. I can only read dvds but I am unable to burn new dvds.Many thanksTomasz

Read other answers


I am wanting to have a record data as default, and restore data to default buttons. So that I can set what the default inputs are for my model and also then when changes are made after saving the default to run a macro that restores the input values to the default.

Anyone know of a possible answer?

Edit: other than just dumping all the data in another tab and then copying it back.


A:Solved: Is it possible for a Macro to record the data in the cells?

Read other 6 answers

Hello, I am trying to record a macro to help me rearrange my data. I have multiple columns, which I would like to move in the same row below each other.


1 4 7 10
2 5 8 11
3 6 9 12 should become


Now, my macro does copy the data from the columns into the row, but overwrites the previous data.


1 7 10
2 8 11
3 9 12

... pressing the macro button again:

1 10
2 11
3 12

Thank you for your help!

A:XLS 2007 - record macro to move column (B,C,D) to same row (A) below each other

Read other 7 answers

I'd like to know how I can reset a macro when I am switching to a new record on an access form, I've made it possible to make a drop down menu visible, but when I continue to the next record, it stays visible instead of resetting.

A:resetting Access Macro when new record is made

Hi JLO, we gotchya in the other thread. Please don't post the same question twice... Just makes more work for us

Read other 1 answers

I'd like to be able to open a template I configured by clicking a toolbar button. With Word 2011 I have to click the template button, then click My Templates, then select the template I use most often from the others, then click the choose button. So I tried recording a macro and went thru all those steps. But when I run the macro, I get the blank template opened, not my template.I can't "write" in Visual Basic, but here is what was recorded in VBSub NewNotes()
' NewNotes Macro
Documents.Add Template:="Normal.dotm", NewTemplate:=False, DocumentType:=0
End SubI tried editing the code to Add Template:="Notes.dot", which is the name of my template. Then I tried also changing NewTemplate:=True. I get a runtime error 4198 command failed. I don't know what DocumentType:=0 does.Because I'm running Word 2003 in a virtual machine, I use .dot templates in 2011 instead of .dotm and I save my documents in .doc instead of .docx so I can open the docs saved in 2011 in 2003. I tried creating a Notes.dotm template and recording the macro, but when I ran the macro I got the blank template instead of Notes.dotmAnyone know how I can edit the macro to make it open Notes.doc or Notes.docm?

Read other answers

I need to duplicate a record on my main table by using a form off the main table. I know you can simply use the wizard with a command button but I don't want to use the wizard. I need to write a macro for the command button because I want the macro to do other things like add a message and so on. I have tried the setvalue option but it didn't seem to work. I want to duplicate the entire record into a new record. My primary key is based on an auto number so that should be the only thing that changes. Do you know how to write a macro to duplicate a record in a table?

A:Access. How do I duplicate a record on a form using a macro.

I don't have instructions for doing it with a macro but if you modify this and put it on the On_Exit event of the last control on your form the values will be carried over to the new record by default.

With CodeContextObject

.YourFirstField.DefaultValue = """" & .YourFirstField & """"
.YourSecondField.DefaultValue = """" & .YourSecondField & """"

End With

Just replace the YourFirstField, YourSecondFiled with the names you are using and it should work for you. If you insist on doing it with a macro I think you have to use the set value like this:

Action > SetValue
Item > [Forms]![FormName]![YourFirstField]
Expression > """" & [YourFirstField] & """"

I think that is how you do it with a macro. Let me know if you need more help.

[Edited by Talismanic on 06-06-2001 at 09:58 PM]

Read other 3 answers

Is there such a tool or utility for Vista x86 or x64?

I need something that could capture a sequence of clicks.. so i could assign a "hot key" sequence for that event..

This is for the nvidia control panel which no longer supports hot keys.. hence i could then switch profiles with a few keypresses..

Any thoughts?


A:Macro program that can record keystrokes or mouseclicks and reproduce with keypresses

its a gaming device, but i believe the belkin speedpad n52 is capable of 64 bit vista, i will look into it, there may be others buti dont know any others, it can do mouse clicks and any keys, just not move the mouse.
I would look into gaming devices

Read other 3 answers

Hi all. I'm attaching an image of a macro that came useful in many of the Modal Pop-ups that were included in Access 2007 templates.

It saves the form, then opens a form that you specify at the ID of your hyperlink. It will then requery the form and search for the records for that ID.

Is there a VB that does all this in Access, so I can get away from using the macro?

Read other answers


I was wondering if anyone could help me. I need to extract data from multiple excel files into a new excel file and sum the values. The data comes from excel files that are made from a template so the data is always in the same place or same cells. For example, i have data saved daily in excel files with the following naming convention 080204, 080304, 080404,..... and so on. What i would like to do is have a macro that will create a week ending sheet by importing and summing the data from that week.

Thanks for reading!

A:excel macro for copying and pasting data from multiple excel files

thanks for all those who read!!!! let me know if anyone needs the code!

Read other 1 answers

I am trying to create a code that will autofilter data on an Excel worksheet. The code works fine to filter the data, but it does not hide the AutoFilter Arrows.

Below is the code I am using. What (if anything) is wrong with the code below?

ActiveSheet.Range("A1:D500").AutoFilter Field:=2, Criteria1:="<>", Visibledropdown:=False

A:Solved: Excel 2007 Macro -> Hide Excel AutoFilter Arrows

I noticed that the code above (in Post #1) that the AutoFilter Arrows were beinf truned off on Field 2, but none of the others.

I have played around, and done some research to come up with the code below:

Dim c As Range

For Each c In ActiveSheet.Range("A1:D1")
ActiveSheet.Range("A1:D500").AutoFilter Field:=2, Criteria1:="<>"
c.AutoFilter Field:=c.Column, Visibledropdown:=False

Does anyone have a better solution?

Read other 1 answers

Iím using Windows 7 and I used a macro which worked totally fine under Excel 2003. Now, under Excel 2007 it does not run anymore but displays the following error message:

"Run-time error '445':
Object doesn't support this action.

The function of the macro is to open up all other Excel spreadsheets located in the same folder and copy data out of them into the spreadsheet in which the macro is stored.

When I click on "Debug" the Visual Basic Editor highlights the row which says: Set FilSrch = Application.FileSearch

Can you help me with this? I've searched for a solution for a long time but could not find anything which worked.

The following is the start of the macro code:

Sub UpdateTable()
Dim X As Range, I As Integer, J As Integer, RecNo As Integer, CopyVal As Variant
Dim SourceBk As Worksheet, DestBk As Worksheet, StartRow As Integer, IndRange As Range
Dim ServRange As Range, SrcOpen As Boolean, SourceName As String
Dim FilSrch As Object, MyFilArray() As String

'MsgBox "This function not available in this version.", vbInformation, "Function Not Available"
'Exit Sub
'Sheets("LookUp").[a12] = Now
With Application
.ScreenUpdating = False
.StatusBar = "Counting source files ..."
End With
Set FilSrch = Application.FileSearch
With FilSrch
.LookIn = ActiveWorkbook.Path
.FileType = msoFileTypeExcelWorkbooks
If .Execute > 0 Then
ReDim MyFilArray(.FoundFiles.Count)
For I = 1 ... Read more

A:Solved: Excel 2003 Macro Doesn't Run in Excel 2007 - Help Requested

Read other 7 answers

Hello again,

I have a word doc that has a form in it. The form may have any number of fields (boxes) to type text answers into, or be a drop down list to select an answer from. I need an excel macro that extracts all data from the form, but with every five fields starting a new row in excel. So all data from the form will appear within 5 columns in an excel spreadsheet.

field 1 field 2 field 3 field 4 field 5
field 6 field 7 field 8 field 9 field 10

Is that possible? I have had no luck to do it myself.

Sample form attached, thank you

A:Solved: Excel macro to extract Word form data into Excel

Read other 7 answers


I need help to create an Excel macro that would

1. ask users to select x number of rows to be copied from one worksheet of one Excel file
2. once users have selected the rows to be copied, then the rows are copied from the one original Excel file into X number of target Excel files

the target Excel files are all based on the same template
there is one worksheet in each of the target Excel files

in the target files, the rows should be copied from the first available empty row, going down

Looking forward to your help!

Thanks a lot.

A:Macro needed to copy x number of rows from one Excel file into a batch of Excel files

Hi, welcome to the board.
Not much info there to get the correct picture.
Sample? Of source and template please
And not to forget, what version of Excel are you and the users using?

Read other 1 answers

I want to merge two excel files into a 3rd one.

The data are in the files Book1, Book2 and the result in Book3.

I know that i can use VLookup to do the above. But what i have pasted is just an example. The real excel files contains about 9 columns with at many repeating row!!!

Any help will be much appreciated.

A:Excel - macro to merge 2 excel files using a common column

Hi welcome to the board. How are you going to treat the duble items, If you want to merge 2 files adn duplication occurs here must be one cell whihc is common to let's say Book1 and Book2.

Do you have a common value? Index? Whatever you call it?

Read other 3 answers

I'm working on a Bill of Material creation automation project that requires some expertise in VBA, and I have none.
The objective is to run a macro from an excel spreadsheet called "PGE BOM", to do the following:
1) Go to the folder "C:\Documents and Settings\Desktop\Auto Project"
2) Find all the .mdb databases in this folder
3) Find "HistoricalMaterialItemsAll" table in EACH of those databases in step 2, and import the data from the columns listed below into PGE BOM.xls's columns C through G:
The following is a VBA code that my friend had written in Excel 2007. Unfortunately I have an older version (2000) and the code does not seem to be compatible with Excel 2000.
Sub ImportAccessData()
dPath = "C:\Documents and Settings\Desktop\Auto Project\"
sFile = "*.MDB"
strSrch = dPath & sFile
Set TargetWB = Application.ActiveWorkbook
Set TargetWS = TargetWB.ActiveSheet
sRow = 2
bFile = False
If Dir(strSrch) <> "" Then
strFlNm = Dir(strSrch)
bFile = True
End If
Do Until bFile = False
strPath = dPath & strFlNm
Call GetData(strPath)
strFlNm = Dir
If strFlNm = "" Then bFile = False
End Sub
Sub GetData(fl)
strSQL = "Select HistoricalMaterialItemsAll.* From HistoricalMaterialItemsAll"
Workbooks.OpenDatabase fl, strSQL, xlCmdTable
Set WB = Application.ActiveWorkbook
Set WS = Applicatio... Read more

A:Excel Macro - VBA code to import access data to excel

Hello, and welcome to the board!

When posting code, please use CODE tags, which extremely helps with readability.

Perhaps you could try using the code constant???...

Option Explicit

Sub ImportAccessData()
Dim dPath As String, sFile As String, strSrch As String
Dim TargetWB As Workbook, TargetWS As Worksheet
Dim sRow As Long, bFile As Boolean, strFlNm As String, strPath As String
dPath = "C:\Documents and Settings\Desktop\Auto Project\"
sFile = "*.MDB"
strSrch = dPath & sFile
sRow = 2
bFile = False
Set TargetWB = Application.ActiveWorkbook
Set TargetWS = TargetWB.ActiveSheet
If Dir(strSrch) <> "" Then
strFlNm = Dir(strSrch)
bFile = True
End If
Do Until bFile = False
strPath = dPath & strFlNm
Call GetData(strPath, TargetWB, TargetWS)
strFlNm = Dir()
If strFlNm = "" Then bFile = False
End Sub

Sub GetData(fl As String, WB As Workbook, ws As Worksheet)
Dim strSQL As String, iRow As Long, sRow As Long
strSQL = "SELECT HistoricalMaterialItemsAll.* FROM HistoricalMaterialItemsAll"
Workbooks.OpenDatabase fl, strSQL, 3 'xlCmdTable
iRow = 2
Do Until ws.Cells(iRow, 1) = ""
ws.Cells(sRow, 7) = ws.Cells(iRow, 5) 'Get the Description
iRow = iRow + 1
sRow = sRow + 1
Application.DisplayAlerts = False
WB.... Read more

Read other 1 answers

Hi, I have created an excel macro that runs sensitivities in my model. The excel button runs 5 different cases.

The macro runs fine and does as I want it to.

Once the macro has run, and I go to edit a cell and hit "F2" excel crashes. This only seems to happen in certain cells and not all of the time.

Does anyone have experience with similar questions?


A:Excel Macro runs fine..then excel crashes

Read other 11 answers

Does anyone know how to run Excel 2003 print macro on Excel 2007 or higher? When I tried running my 2003 macro, the VBA editor pops up w dialogue box, " Run-time error '1004': Method 'ActivePrinter' of object'_Application' failed ".

This is my code: Application.ActivePrinter = "Epson LQ-300 ESC/P 2 on USB003"

Can anyone help?


A:How to run Excel 2003 print macro on Excel 2007?

Welcome to TSG hope we can help you and you can help others.

I'm not an Excel macro guy but you code looks reasonable. What happens if you run this. I suspect printer name is a little off.

MsgBox "The name of the active printer is " & Application.ActivePrinter

Read other 1 answers

I run a weekly excel 2007 macro that converts a spreadsheet to a Word document, but it stops after row 29 of data. Any spreadsheet with 29 rows or less works fine. If I have 34 rows of data, the macro hangs. See below for script. Any help would be appreciated.

Public Sub AddControls(WrdApp As Word.Application, CurRow As Integer)
Dim OptChecked As Boolean
Dim GrpName As String
GrpName = "Grp" & CurRow
'Calculate the colors based on the cell information.
CurRange = "F" & CurRow & ".." & "F" & CurRow

If InStr(1, UCase(ActiveCell.Text), "X SRM") > 0 Then 'SRM
OptChecked = True
OptChecked = False
End If

SetCellBG WrdApp, True
WrdApp.Selection.TypeText Text:="Governance:" & vbCrLf

Set RadioObj = WrdApp.Selection.InlineShapes.AddOLEControl("Forms.OptionButton.1")
With RadioObj.OLEFormat.Object
.GroupName = GrpName
.Caption = "SRM"
.Font.Name = "Arial"
.Font.Size = 8
.Value = OptChecked
End With

If InStr(1, UCase(ActiveCell.Text), "X PPO") > 0 Then ' PPO
OptChecked = True
OptChecked = False
End If

WrdApp.Selection.Collapse Direction:=wdCollapseEnd

Set RadioObj = WrdApp.Selection.InlineShapes.AddOLEControl("Forms.OptionButton.1")
With RadioObj.OLEFormat.Object
.GroupName = GrpName
.Caption = "PPO"
.Font.Name = "Arial"
.Font.Size = 8
.Value = O... Read more

A:Excel Macro - converting excel to word doc - stops after row 29

Read other 13 answers

Hi guys,

I have been on the lookout for a macro that will compare 2 worksheets within MS Excel and output the differences on a third sheet.

I am being directed to the URL below but cannot for the life of me work out how to implement this:


There are two snippets of code which I will include here for convenience but not sure whether these should be pasted into Workbook Code (i.e. right-clicking Excel icon left of "File" - top-left), Worksheet Code (i.e. right-clicking worksheet tab) or inserting a new Module - or some other method. Is there anyone here that could guide me to how to implement this code?

Quote from webpage - "With the macro below it is possible to compare the content of two worksheets.
The result is displayed in a new workbook listing all cell differences. "

Sub CompareWorksheets(ws1 As Worksheet, ws2 As Worksheet)
Dim r As Long, c As Integer
Dim lr1 As Long, lr2 As Long, lc1 As Integer, lc2 As Integer
Dim maxR As Long, maxC As Integer, cf1 As String, cf2 As String
Dim rptWB As Workbook, DiffCount As Long
Application.ScreenUpdating = False
Application.StatusBar = "Creating the report..."
Set rptWB = Workbooks.Add
Application.DisplayAlerts = False
While Worksheets.Count > 1
Application.DisplayAlerts = True
With ws1.UsedRange
lr1 = .Rows.Count
lc1 = .Column... Read more

A:Solved: How to use this Macro in MS Excel (compare excel worksheets)

Apologies... I have sorted this... For those that might be looking at this for help here's what I missed:

These are both Sub's that should be created as a Module - both in the same module. I am just comparing worksheets within the Active Worksheet so just removed:

' compare two different worksheets in two different workbooks
CompareWorksheets ActiveWorkbook.Worksheets("Sheet1"), _
Click to expand...

I was then able to run this from Macro's. All sorted.

Apologies again

Read other 1 answers