Hi,
was wondering if anyone can put some input on this:
Is there a simplier way to color a cell in MS other than going to call the VBScript to color the cell?
Currently i have to open up Excel in MS, add values to the cell, close it, call vbscript with the file name, rows, column, sheet - which then color that using Interior.ColorIndex, it then have and quit before the end of the subroutine.
Any inputs on having MS open up the file and input the data and color code the cell it just input the values into?
or any suggestion on better way to handle this?
Best I can think of without having to open/close excel over and over every time there's data input and color coding it would be to write the row/colums/sheetname into a text file and then at the end of it to read from the text file to pass the value to vbscript to color code it.
Thanks
VBScript and XLCreate/Quit
Moderators: JRL, Dorian (MJT support)
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Firstly, why do you need to close and open the Excel file each time? Why can't you keep the Excel file open? Then just issue the VBScript code (presumably you are referring to VBScript code which access the Excel object model) to color the cell.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
See:
http://support.microsoft.com/kb/288902
According to that you can use e.g.:
Set xlApp = GetObject("Book2").Application
Where Book2 is the workbook name.
http://support.microsoft.com/kb/288902
According to that you can use e.g.:
Set xlApp = GetObject("Book2").Application
Where Book2 is the workbook name.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?