The best way to learn how to do something when working with Excel is to have Excel record a macro that does the operation.
You can do that by calling Tools...Macro...Record New macro.
You perform the operation, setting the color of a row in your case.
You click the Stop Recording Button in the small toolbar that was created when you started the recording. If the toolbar is not visible, you can stop the recording through Tools...Macro.
You then Switch to the VBA editor with Alt-F11. In the VBAProject window in the upper left, you should find a module that contains the recorded macro. The Object.Method necessary to perform the operations you did while recording will be there in plain sight. You only have to adjust them to the variables you used in your .NET code.
Jacques Bourgeois
JBFI
http://www3.sympatico.ca/jbfi/homeus.htm
Bookmarks