Allow User To Color Selection From VBA Macro
Sep 10, 2009
I see where I can use the following to bring up the color pallet
VB: AutoLinked keywords will cause extra spaces before keywords. Extra spacing is NOT transferred
when copy/pasting, but IS if the keyword uses "quotes".
Sub MyColors()
' brings up the colors dialog
Application.Dialogs.Item(xlDialogColorPalette).Show
End Sub
But I don't know where to go from here. I would simply like to have cells selected, run the macro, select a color from the dialog, press the ok button, and have the selected cells colored per the color selected in the dialog. (Of course, pressing cancel would exit without changing any colors.)
View 9 Replies
ADVERTISEMENT
Jun 3, 2013
If a user selects certain options from a drop down list created by cell verification (from list), is it possible to display an input box and have the resulting input populate on another worksheet in the workbook? I have an attendance template I'm working with and if a user selects OT (Over Time) then a input box is displayed prompting for how many hours. The overtime is then tracked on another worksheet.
View 1 Replies
View Related
Jun 16, 2006
find attached zip file . if you open the file then you can understand the problem.
I need to change cells color and text color as per user choice in Password protected sheet : (user is useing excl2000)
Kindly open attahced file i putted the note inside the file.
View 3 Replies
View Related
Apr 18, 2007
There must be a VBA command out there, with which one can call the color panel such that the user can then choose his/her preferred color, I just cannot find it. Could you help me out?
With Color-Panel I mean this little interface you get when manually changing the font-color or the fill-color. (it consits out of maybe 8 colors in a row and 5 colors per column and usually has a button "automatic"). I would like to call that interface such that it gives back the color-index of the color choosen by the user.
View 9 Replies
View Related
May 16, 2009
I want is to happen is that depending on which option a user selects from the drop down box (a total of 10 options), a select number of rows and columns should be hidden/visible (as you'll see from the below code..)
The other issue I'm having is that with the below code, the workbook seems to be very "busy" constantly calculating something or the other. I need the Sub to be run ONLY when a user changes a selection in the combo box, but it appears that every few seconds the workbook will be calculating something.
Finally, I introduced the GoTo Endo line after every option (1 to 10) to try and speed up the Sub when a user makes a selection, but this appears to make no differnce - it still takes forever to run the Sub.
View 2 Replies
View Related
Feb 19, 2007
i have list of users with name, company, division, subdivision, date ...
the list can contain more than 10000 users and i want to be able to switch 2 users using a listbox/filter/ validation list.
there can be multiple users with the same name even company so a simple validation list which is limited to 1 column will not suffice. the interface for the switch should be fool proof so anyone can switch 2 users.
View 6 Replies
View Related
Oct 23, 2008
The code below opens a window which allows the user to select a file to open. Apparently, it starts in the directory of the file containing the macro. How would I modify this to open in "M:Archived PO ResponsesProcessed"?
View 3 Replies
View Related
Oct 21, 2009
Using the Roy Cox Database code http://www.excel-it.com/vba_examples.htm , I am trying to populate a user form when the user selects a list row. I don't know if this is important, but I have extended my list beyond 10 columns. The list appears in UserForm2, and it should populate UserForm1. UserForm1 is also available to fill in from scratch; the info pulled from UserForm2 is from a search.
Here is my problem:
UserForm1 does not populate with the current selection, but rather the previous selection. It will appear blank upon the first selection. If I close UserForm2 after getting a blank on Form1 and call UserForm1 from its own macro, I will also see that previous selection.
View 2 Replies
View Related
May 7, 2006
I'm trying to create a spreadsheet that will automate our job bidding process. We have alot of standardized phrases we use and I thought it would be nice to just click on the phrases that are pertinent to the user's current bid. How do I get the user's current selection (from a form, not a cell) to append itself to the "current" end of the bid (a worksheet)? In other words, previously entered information by the user (name, address, type of bid, etc.) is already updated on the new worksheet created by the new bid, but how do I get the user's current selections to find the end of what is already there, and add itself to the bid at that point?
View 9 Replies
View Related
Jan 11, 2007
I just loaded 2007, and among the things driving me nuts is I can't figure out how to change the color of highlighted cells that I have selected. The default color is so close to the normal background color(White) that it is difficult for me to distinguish between selected cells and unselected cells.
I've tried the built in help but couldn't seem to search for the right phrase to bring up a relevant answer. I've had the same problem when trying google and Microsoft's office 2007 help site. I also searched the forum before posting and came up blank.
View 9 Replies
View Related
Apr 2, 2013
How do I change the color of a row, based on the users selection from a drop down box in that row? I have four driving types in my drop down , Towing - Town Driving - All highway - Mixed. I would like each driving type, if selected, to change the color of the entire Row of Data to a different color. I have been able to use conditional formating to change the drop down cell itself, but that is it.
View 1 Replies
View Related
Jan 5, 2009
I've tried to do conditional formatting for each of the "Discipline" values in this spreadsheet but it is restricted to only 3. Is there a way around this? I'm trying to setup a color code for the "Discipline" values for example RN=Red, LPN=Blue, Social Worker=Orange, Chaplain=Purple, STNA=Yellow, Volunteer=Pink & Other=Green. So when the "Discipline" cell/cells on each of the patient sheets (ie. "Doe, Jane", "Doe, John", etc.) is equal to say RN the cell would then turn Red either on the spreadsheet or only when sheet is printed.
View 5 Replies
View Related
Feb 20, 2008
What I want to do is have a macro color and merge whatever range I have selected when I run the macro. I can get this far.
Private Sub CommandButton1_Click()
With Selection.Interior
.ColorIndex = 1
.Pattern = xlSolid
End With
Selection.Merge
End Sub
What I DON'T know how to do is set it to where if I have multiple selections, have a message box pop up that states I can't do this on multiple selections, and cancel the macro running. I think it will involve defining 'Multiple selection' as boolean, and then some string of code stating that if it is true, run the message box and don't run the macro, and if it is false, go ahead and run the macro. I just don't know how to write the code.
View 6 Replies
View Related
Nov 29, 2012
I have a spreadsheet that has a long list of charges... some of those charges have multiple codes attached to them... when this happens I am wanting to group them together and let the user pick which one they want to view at one time.
Here is a very small example of what exactly I am referring to... with charge #14 I am wanting it to combine and let the user pick between 2565 and 2566. The problem is that the values can range and will not always be 2565 & 2566 and there is 10,000 + records similar to this.
test.xlsx
View 1 Replies
View Related
Jun 27, 2014
I would like to be able to limit a drop down list's contents based on a user's selection in a different drop down. I am using Excel 2003, and I know how to do this in Access, but I can't figure it out in Excel. Basically, I have a list of themes in one drop down. The user picks a theme, and goes to a second drop down which is a list of sub-themes attributable to that one theme and no other theme.
View 1 Replies
View Related
Dec 14, 2012
I have a dynamic drop down list using OFFSET and want to change a selection of cell colors based on the drop down selection. My drop down list is located in cell G4 and the cells I want to change are
=$C$9,$C$10,$C$11,$B$11,$B$12,$C$12,$B$13,$C$13,$C$14,$C$15,$H$15,$H$14,$H$13.
These are random cells. There is no value in the cells, I just want to change the color from green to gray.
View 3 Replies
View Related
Aug 7, 2007
I am trying to use a userform ( Combo Box) to update my named cell "Aircraft1" then based on the value selected change the color of an object.
The code works great if I manually enter the value in the cell "Aircraft1", however if the dropdown list selects the value the object does not update its color.
Is there a way to update the cell via a combo box, and then have the VB code change the color of the object?
This is my
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("Aircraft1")) Is Nothing Then Exit Sub
ActiveSheet.Shapes("Arrow1").Select
With Range("Aircraft1")
If .Value = 1 Then
ActiveSheet.Shapes("Arrow1").Select
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 17
View 5 Replies
View Related
Mar 8, 2007
I have searched for code in the forum to help me here but could not get any of the possible choices to work for me. I have a spreadsheet that is password protected but would like the user to be able to change the color of the fonts based on the user's choice. The protected page (one of many in the spreadsheet) has various cells that are unlocked so that the user can enter data. The rest of the page is locked. I have allowed all users of the worksheet to Select Unlocked Cells only. I have attempted to allow them to Format cells as well, but each time the program is re opened this feature is no longer working. (The program has a macro that ensures it opens in protected mode each time.)
So I would like to set up a Macro that allows the users to set the color of 6 rows and 5 columns based on their choice. An example of the configuration is:
1234Color Choice
A11016221
B21117232
C31218243
D41319254
E51420265
F61521276
Using the above format, I am imagining the I would have a Key with color codes (using the ColorIndex Properties). The user would type in the appropriate number for each row and click a button and the rows (5 cells each) would change to the selected color.
View 9 Replies
View Related
Nov 21, 2012
I am new to VB macros, I am trying to figure out how to color a tab Green based on a selection from a drop down list.
View 9 Replies
View Related
Feb 5, 2009
I am wondering, in excel 2003 is it possible to randomly select two numbers from one column, say column b9:b45, that are random numbers, and selected by two different font colors. In other words: b9=1348, b10=1349, b11=1350, b12=1351, b13=1352, b14=1353.
Say we press a macro button, and in field B50 one radom black colored number is selected of a field of say 30 numbers that are all black in that column, and in b51, one red number is selected, in a field of 30 red numbers. We want to used this macro to select winners simulating a raffle drawing.
View 4 Replies
View Related
Oct 19, 2009
The list boxes on my Form all have a dark blue backround which makes it hard to tell when the box has been selected for data entry. Could someone tell me what item in the "properties" window controls this function.
View 14 Replies
View Related
Jan 15, 2009
I wrote a macro to color the cell values in the rows based on their average value. For eg if the cell value is less than 0.2 Avg, they should be red color,if value is between 0.2 and 0.5 it should be yellow. This part is working fine
Now based on the color of the rows cells , need to write a macro for the header one. Logic is Coloum header should be in red colour, if in one or more number of rows cells are red. same with yellow ones. Could you please help me out in solving this with logic.
View 8 Replies
View Related
Jan 29, 2009
so I know how to change the color of a command button(right click, properties), but is there a way to change the color to a specific red green blue range? lets say 102 28 02 for example
View 2 Replies
View Related
Jun 18, 2008
I have a spreadsheet that i download from the net daily, which is seperated into columns of information.
I want to be able to look down a column and mark a cell in a seperate column if the cell font text is red.
For example looking down column A ... if the font text of a1 is red then mark the cell background colour of T1 red - if a2 text colour is red then mark the cell T2 red .... etc etc.
If the font colour in a1 or a2 ... etc etc is any other colour then do nothing.
I have 5 columns I wish to look down and mark in 5 seperate columns - I have tried to do this by conditional formating but don't know the fomula for checking font colour.
View 9 Replies
View Related
Jun 3, 2006
find the attached workbook
I have a Database and user form, in the user form i have a field named “Vehicle No” this is a combo box from which a user needs to select the Vehicle numbers, and all these are working fine now, I need your help in the following:
When user selects the second field named "Select Vendor name" i need a pop up window which shows all the Vehicles belongs to the vendor which they have selected, and with the popup window user selects the vehicle number then the Vehicle number combo box should be filled.
Currently users have to select by scrolling through Combo box which takes long time and difficult to find by scrolling.
View 7 Replies
View Related
Jan 15, 2014
I have a macro where I manually select a cell then the macro kicks in to copy and paste the contents into the Find function. From there it goes to another work sheet, clicks on a cell in column one and searches for matching cell contents. Then If false it manually goes back to the original worksheet/cell and then I input a N in the left adjacent cell. If true I enter a Y. Right now I can only run this for the specific cell the macro was recorded for. I would like to expand this.
What I would like to do create a loop in the macro that waits for my cell choice input then continues with the with the Find function. If false the macro should just loop back to the original worksheet/cell and wait for input, ie the next cell selected. However, if true a worksheet/cell is selected, a Y is input and it loops back to the original cell and waits for input.
View 9 Replies
View Related
Nov 6, 2011
I use Excel 2003 at work. I'm looking for some code that will Open a folder and then lets the user to select a file then continues to run the macro.
The file name they select will look similar to this K2271011.504 or K3011111.201
View 3 Replies
View Related
Jul 16, 2007
I have written two VBA programs around the same time. Both run on open and pull external data and create graphs. My problem is that I want the end user to be able to run the report multiple times by choosing the name of the macro from the Excel macro menu (i.e. Tools>Macro>Macros) but only one of the workbook macros shows up on the menu. why the other macro is not visible on this menu???
View 2 Replies
View Related
Oct 9, 2012
I have recorded the following marco and it works fine. I would like to modify it so the user would highlight a range of cells rather than have the fixed area :
"'ConsExecProp@20120920'!R4C5:R113C21"
What code lines would need to be added?
Application.Goto Reference:="R4C5"
ActiveWorkbook.PivotCaches.Create(SourceType:=xlConsolidation, SourceData:= _
Array("'ConsExecProp@20120920'!R4C5:R113C21"), Version:=xlPivotTableVersion12 _
[code]....
View 4 Replies
View Related
Apr 14, 2014
How to create a macro that selects only the 2nd file in a folder to be opened instead of every file.
So far the code below is opening every file.
Sub ConsolidateAll()
Dim wkbConsol As Workbook
Dim wksConsol As Worksheet
Dim wkbOpen As Workbook
Dim wksOpen As Worksheet
Dim FolderName As String
Dim FileName As String
Dim Cnt As Long
Application.ScreenUpdating = False
[Code] .......
View 2 Replies
View Related