Hi,
I don't know if this is in the wrong section, but I figure it's more javascript than excel VBA...
I'm trying to mess around changing the background, foreground color... Now the following code will open the excel sheet, and as per
http://msdn.microsoft.com/library/de...ShapeRange.asp, the ws.Cells line should be able to change the color... Now the issue is that when I try it I get "Unable to set the Color property of the Font class", and if I try it with the "RGB(170, 170, 170)", I get no object, which I'm assuming is because it's looking for a function called RGB... Any help would be great...
function startup()
{
fileLoc = document.forms[0].fName.value;
if (objXls == null)
{
objXls = new ActiveXObject("Excel.Application");
objXls.Visible = true;
objXls.WorkBooks.open(fileLoc);
ws = objXls.ActiveSheet;
}
ws.Cells(1,1).Font.Color = "#cccccc"; // "RGB(170, 170, 170)";
}