Excel 2011 :: Macro Recorder Doesn't Record Fill Color
Oct 11, 2011
I am using office 2011 for MAC, and am trying to create a macro that changes the color of the selected cell(s).
if I start recording the macro
click the fill color button pull down and change the color on the edit section of the ribbon
Stop the macro
No code is recorded as below but the cell did change color to whatever I selected.
Sub Macro13()
'
' Macro13 Macro
'
'
End Sub
[code].....
The colorIndex is automatic no matter what color I choose.
When I run the macro there is no change to the selected cell, but the border is destroyed.
View 2 Replies
ADVERTISEMENT
Dec 6, 2013
Had 2003 now 2013. Trying to get the macro to select different printers for different doccuments. 2013 macro recorder does not record any printer info or path, all printers show the same wording just application print...
How can I get the recorder to acurrately record and diferentiate printers?
View 2 Replies
View Related
Feb 22, 2014
Using excel 2011 for mac and would like to learn how to write and record a macro to link to a button to "go to a layout and cell"
View 4 Replies
View Related
Aug 12, 2012
In Excel 2010, you can color a cell with a fill color and a font color.
It can be done manually via one of 3 methods that I know of (aside from a macro or a routine):
-From the ribbon button (underneath the font size and increase and decrease font size toolbar buttons)
-By formatting the cell (right clicking on a cell),
-Clicking on the ribbon's font section (giving you the same 6 category format cell box as right clicking on a cell)
What I need is a routine that resets the Fill Color and Font Color toolbar buttons to "No Fill" and "Automatic" if I run it inside a macro or create a command button on a worksheet.
View 4 Replies
View Related
Mar 2, 2014
Alright, so I have Excel itself maximized but the window containing the cells doesn't fill the space that it should... if this makes sense, its like the cells have become a subwindow or something ...
View 1 Replies
View Related
Jan 30, 2012
I'm using Excel 2011 for MAC.
What I need is to clear and lock some cells based on a drop down list selection.
The case is like this:
In Cell [E14] is a drop down list : 0,1,2 or 3
Cells: (D19:E19), (D21:E21), (D23,E23) Merged are PART DESCRIPTION
Cells: [G19], [G21], [G23] are COST
So I need when 0 is selected in the dropdown list, all of the above cells are cleared and no input is permitted, Cells locked.
If 1 is selected, just the first row is allowed for data entry and the other 2 are cleared and locked as this values populate another worksheet for calculations.
So far I did this code:
Private Sub Worksheet_Change(ByVal Target As Range)
If [E14] = "0" Then
ActiveSheet.Unprotect ("")
ActiveSheet.Range("D19:E19").Locked = True
ActiveSheet.Range("G19").Locked = True
ActiveSheet.Range("D21:E21").Locked = True
ActiveSheet.Range("G21").Locked = True
ActiveSheet.Range("D23:E23").Locked = True
[code]...
It works fine to lock the cells, but I can not fined the way to clear the values previously stored before locking the cells.
View 9 Replies
View Related
Nov 20, 2013
I have been given a macro recorded on a mac and it works fine with Mac Excel 2011. Unfortunately, I need to make it to work on a windows machine, but it comes up with an error message "macro unable to set width property of the window class. Run-time error 1004". When I press debug it takes me to the line .Width = 1456.
Below is the chunk of the code that becomes highlighted when pressing debug.
With ActiveWindow
.Width = 1456
.Height = 795
End With
View 3 Replies
View Related
Jan 26, 2012
I have a workbook in which there is a sheet containing a table.
Excel 2002ABC123Specific Gravity6 Volt ValuesSOC40.0000.000Dead
51.1345.97010%61.1485.99020%71.1626.02030%81.1766.06040%91.1906.10050%101.1976.12055%
111.2046.14060%121.2116.16065%131.2186.18070%141.2256.20075%151.2336.23080%161.2416.26085%
171.2496.31290%181.2576.32095%191.2656.350100%SOC Chart
From another sheet I query this table using the LOOKUP function to obtain values from column C such as 25% 60% and so on. A typical query formula looks like this:
=LOOKUP(B2,'SOC Chart'!B4:'SOC Chart'!C19)
It would be nice if the fill color came along with the value.
View 3 Replies
View Related
Apr 2, 2009
I need a macro to fill any cell in any column with red color. The same cell should also have red fonts with word 'RED' typed in the cell, so that word 'RED' is invisible.
View 9 Replies
View Related
Jun 9, 2009
I hide all Excel standard tabs and thus need a button on custom tab to record a macro. (I did this successfully with custom menu in Excel 2003.) In 2007 ribbon, I've reused the code for a button's OnAction, now going to callback that runs:
Application.CommandBars.ExecuteMso ("MacroRecord")
In Excel 2003, the stop button appeared automatically for me. But in Excel 2007, with hiding standard tabs, etc., I see no way to stop recording, other than running my button to return the Developer's tab, where the Record Macro button has changed to Stop Macro.
I'd like to either add a second button to my ribbon to stop recording the macro (but I can't find an idMso to use in a callback) or have my Record button change to Stop button, like Excel does. But I can't come up with correct code.
View 4 Replies
View Related
Jun 10, 2009
I used macro recorder, and this code was the result. Is there a way to shorten this code up? The more I use macro recorder, the more I'm beginning to realize that the code generated from macro recorder can be very sloppy.
View 8 Replies
View Related
Jul 7, 2009
Have recorded a Macro which is doing a great job, but when i try to run the same macro from other pc its not running,pops an search error.
View 9 Replies
View Related
Jun 22, 2006
Is it possible to use the Macro recorder in Excel to store user variables that they put in through a UserForm? So say when a textbox on a userform is changed, it records a macro of what is put into the textbox, which it can then call to retrieve the value.
View 4 Replies
View Related
Jul 25, 2006
The way i have been creating macros is by going to the tools menu.....macro....then..... record new macro.
I have a file which I have re-formatted using a macro as described above however because i receives files every month to do updates every time i open a new file and try to perform that same macro it either wont work or it wont format the correct rows.......is VBA the solution to this????
View 9 Replies
View Related
May 7, 2014
I have created a macro that a couple of us can run at the end of the day that looks in a preset folder and has whatever .xlsx files in that append to each other creating one .txt file. It then saves that .txt file and runs a batch file that strips off the .txt file extension. This is the format we need the ending file to be in so we can FTP it to another agency.
Myself and another coworker can run it without any problem and it asks us if we want to save the .txt file before it closes it and runs the batch file stripping off the .txt extension. We say yes and it executes as designed. Another coworker runs it and it looks like the files are appending then the window closes. Never prompts him if he wants to save and the file is nowhere to be found. From what I have researched all his excel settings match ours. We are all running the same OS (XP) and version of MS Office (2007). The part of the macro that seems to just be ignored is below:
[Code] .......
Then the following batch file runs stripping the .txt file extension:
FOR /R "T:Cash ManagementUnsecured\_Team - DisbursAUTOMATIONInput" %%f IN (*.txt) DO REN "%%f" *.
I have tired removing the ActiveWorkbook.Save command thinking it would default to prompt him to save it but it doesn't.
View 2 Replies
View Related
Jul 31, 2013
i have a macro which i have created to send outlook notification email through excel 2010 when the excel file is saved. I would like to attach the same excel file as an attachment in the outlook email so that everyone in the mailing list can view the attachment. however the macro which i created does not work. i would like to know what is the problem with the macro below. there's an error which says "file path does not exist" when i try running the macro but i have verified my filename is correct & the drive i have saved the excel file is in Z: drive. My file name is 'Tracking File.xls'
'Save Workbook
ActiveWorkbook.Save
'Criteria to send Email
[Code].....
View 1 Replies
View Related
Sep 30, 2008
I used the macro recorder to create a pivot table, but to verfity that it works.
I get a "Add fields method of Pivot Table class failed"..
and this was highlighted:
ActiveSheet.PivotTables("PivotTable2").AddFields RowFields:=Array("Warehouse" _
, "Product", "Description", "Data")
View 9 Replies
View Related
Sep 29, 2006
I have an error message that says: Run time error '1004': Unable to set the colorIndex property of the interior class. I attached code for your reference.
If (Range("B10").Value = "Gift" Or Range("B10").Value = "Entertainment") And Range("C10").Value = "" Then
Range("C10").Interior.ColorIndex = 6
MsgBox "Please Fill in the Person's Name & Company."
Range("C10").Select
Range("C10").Interior.ColorIndex = 6
End If
View 7 Replies
View Related
Apr 14, 2008
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.
View 9 Replies
View Related
Jul 8, 2014
I have a VBS script that runs a macro in a workbook that is located in a SharePoint doc lib. The code looks like this:
[Code]....
I use code exactly like this to run other queries and it works great, but for some reason when I run this macro the instance of Excel doesn't end after the script is done running. I can see EXCEL.EXE sitting in the Task Manager and I have to end it manually.
Here is the code for the macro and related macros:
This macro just calls my other macros. Each terrslicersXX macro is a different sales territory for which there are slicers to filter out data.
[Code]....
An example of one of the sales territory slicers. Basically it just sets the slicer for the required sales territory so the SaveAsWebpage macro can save the information off as a webpage.
[Code]....
Saves the current data as a webpage.
[Code] ....
I have a feeling it has something to do with the last macro and how I publish the sheet as a webpage but I still can't get it to work.
View 8 Replies
View Related
Aug 24, 2007
I have recorded a simple macro ( copying a cell, and then pasting the formula into various others), and I get the following error
Compile Error: Argument Not Optional
I have highlighted where the error first happens
Sub Macro3()
'
' Macro3 Macro
' Macro recorded 24/08/2007 by Michael Traynor
'
'
Range("K7:K8").Select
Selection.Copy
Range("K167:AJ168").Select
Range("AJ167").Activate
Range("K167:AJ168,K175:AJ176").Select
Range("AJ175").Activate
Range("K167:AJ168,K175:AJ176,K183:AJ184").Select
Range("AJ183").Activate
Range("K167:AJ168,K175:AJ176,K183:AJ184,K191:AJ192").Select
As I've said I didn't write this, it was recorded from Excel.
View 7 Replies
View Related
Sep 4, 2007
I've created VBA code in Access 2007 to create a column chart in Excel, and it is working. I need to change the rotation on my category labels to 270 degrees vertical. When I record a macro on the chart in Excel 2007. I only receive the following
Sub chartingRotation()
'
' chartingRotation Macro
'
'
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.Axes(xlCategory).Select
ActiveSheet.ChartObjects("Chart 1").Activate
End Sub
How can I get the macro recorder to record changes to chart properties?
View 4 Replies
View Related
Dec 12, 2006
My macro works fine but I'm interested in seeing if I can speed it up. What I'm doing is starting at the bottom and comparing it with the row above and if they match in font color it will fill the top with orange and delete the bottom. This works but usually takes several minutes.
Public Sub ADMINCompareList()
Dim varTest1, varTest2
Dim lng As Long, i As Integer, iTest As Integer
Application. ScreenUpdating = False
Worksheets("ADMIN").Activate
For lng = ActiveSheet.UsedRange.Rows.Count To 2 Step -1
If Not Range("M" & lng).Font.Color <> Range("M" & lng - 1).Font.Color Then
Goto newrow
End If
varTest1 = Intersect(Range("J:W"), Rows(lng))
varTest2 = Intersect(Range("J:W"), Rows(lng - 1))
For i = 1 To 14....................................
View 3 Replies
View Related
Mar 4, 2009
what do i need to do when the fill tab doesn't go on to the next set of data. It is just repeating the data in the same column from the first calculation--it doesn't go on to the next set..what do I need to change when inserting my calculations...
View 9 Replies
View Related
Oct 11, 2012
I have used the macro recorder to generate the select range and clear part of the following macro.
Private Sub CommandButton2_Click()
Dim test As Worksheet
Sheets("Industry").Copy After:=Sheets(Sheets.Count)
[Code]....
I get the runtime error 1004 - Select method of range class failed.
I have used similar script in other macros without error.
View 2 Replies
View Related
Nov 2, 2008
I'm trying to add a textbox at the current position (selected cell) with a set size, fill color, and border color. I found this: http://msdn.microsoft.com/en-us/libr...8(VS.80).aspx:
View 2 Replies
View Related
Aug 19, 2009
how I can alternate the background color (fill color) of rows in a spreadsheet. Say I wanted every other row to be gray starting at row 10.
View 6 Replies
View Related
Apr 18, 2007
For some reason the fill color and font color no longer work! If I set the font color as red, it continues to show up as black!
This is the strangest thing! I have no conditional formatting set and this just started a week ago.
View 14 Replies
View Related
Nov 26, 2006
1. By entering a numerical value in Cell A1 for example typing 5.
2. Then, next five columns would be blocked with specific color.
3. if i am typing 10, then 10 columns would be blocked with specific color.
View 14 Replies
View Related
Feb 7, 2013
I am using Excel 2010 and basically i am trying to fill a range of cell with a green color if any value was enter in a specific cells. Example: I would like to fill range: A10:c13 with a green color (regardless of the cells content in this range) if a value was entered in cell C10 or C11 or C12 or C13.
I've tried conditional formatting but unfortunately I'll have to apply formatting for every cell and for a range of over hundred cells is not efficient.
View 7 Replies
View Related