Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
If < equal to named list require user to fill out desired columns?
I have a named list of part numbers. I already have conditional
formatting on the cells in column A to test if it is equal to any of the part numbers in the list. If it is not equal to the list it will change colors to green signifying that it is adding a new part number to the database. I would like to require the user to fill out the next 7 columns and leave the rest to be optional. I am grateful for any suggestions! Thanks, Matt |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
If < equal to named list require user to fill out desired columns
Assuming that the cell containing the active part is the ActiveCell:
'Test for new item If ActiveCell.Interior.Color = vbGreen Then ActiveCell.Offset(0, 1) = InputBox("Enter data", "Column B") ActiveCell.Offset(0, 2) = InputBox("Enter data", "Column C") ActiveCell.Offset(0, 3) = InputBox("Enter data", "Column D") ActiveCell.Offset(0, 4) = InputBox("Enter data", "Column E") ActiveCell.Offset(0, 5) = InputBox("Enter data", "Column F") ActiveCell.Offset(0, 6) = InputBox("Enter data", "Column G") ActiveCell.Offset(0, 7) = InputBox("Enter data", "Column H") End If This is psuedo code only to give you an idea of how it can be done. "Matt Pierringer" wrote: I have a named list of part numbers. I already have conditional formatting on the cells in column A to test if it is equal to any of the part numbers in the list. If it is not equal to the list it will change colors to green signifying that it is adding a new part number to the database. I would like to require the user to fill out the next 7 columns and leave the rest to be optional. I am grateful for any suggestions! Thanks, Matt |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
If < equal to named list require user to fill out desired columns
On Mar 5, 8:28 pm, JLGWhiz wrote:
Assuming that the cell containing the active part is the ActiveCell: 'Test for new item If ActiveCell.Interior.Color = vbGreen Then ActiveCell.Offset(0, 1) = InputBox("Enter data", "Column B") ActiveCell.Offset(0, 2) = InputBox("Enter data", "Column C") ActiveCell.Offset(0, 3) = InputBox("Enter data", "Column D") ActiveCell.Offset(0, 4) = InputBox("Enter data", "Column E") ActiveCell.Offset(0, 5) = InputBox("Enter data", "Column F") ActiveCell.Offset(0, 6) = InputBox("Enter data", "Column G") ActiveCell.Offset(0, 7) = InputBox("Enter data", "Column H") End If This is psuedo code only to give you an idea of how it can be done. "Matt Pierringer" wrote: I have a named list of part numbers. I already have conditional formatting on the cells in column A to test if it is equal to any of the part numbers in the list. If it is not equal to the list it will change colors to green signifying that it is adding a new part number to the database. I would like to require the user to fill out the next 7 columns and leave the rest to be optional. I am grateful for any suggestions! Thanks, Matt Well... thanks, but since it is only a conditional formatting that is setting the color, vb did not recognize it as "vbGreen" which actually I had to change ".Interior.Color = vbGreen" to ".Font.ColorIndex = 10"(I tested 10 with two other cells with vb to determine that was in fact the correct color #). I think the problem is that conditional formatting does not actually set those properties, hence you can not test for them. Any other ideas? Thanks, Matt Pierringer |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I delete the name for a named range i no longer require? | Excel Worksheet Functions | |||
Equal to previous cell and named range | Excel Worksheet Functions | |||
Count number of times two columns have desired values | Excel Discussion (Misc queries) | |||
How do i require a user to enter a data in a field in Excel | Excel Programming | |||
User enters data in popup box - its entered into desired cell | Excel Programming |