Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Formatting Excel within ActiveX script


I am creating an excel report from within a DTS package using the
ActiveX script.

I have an excel file that contains column names across the top
(A1:AB1). -- I would like these to be bold.

Then from A2:wherever the data ends I would like to have different
color background on the alternating rows (if A2:AB2 is white, I'd like
A3:AB3 to be grey, and so on)

Does anyone have any code for this?
Thanks,
Ninel


--
ninel
------------------------------------------------------------------------
ninel's Profile: http://www.excelforum.com/member.php...o&userid=33202
View this thread: http://www.excelforum.com/showthread...hreadid=530209

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Formatting Excel within ActiveX script

I'm not all that familiar with ActiveX, but this is how you would do
that in VBA:

Sub ApplyShading()
n = 0
ActiveSheet.UsedRange.Rows.Select
For Each VisRow In Selection.Resize(,
1).SpecialCells(xlCellTypeVisible)
n = n + 1
If n Mod 2 = 0 Then
VisRow.EntireRow.Interior.ColorIndex = 15
End If
Next VisRow
Rows("1:1").Select
Selection.Font.Bold = True
End Sub

ninel wrote:
I am creating an excel report from within a DTS package using the
ActiveX script.

I have an excel file that contains column names across the top
(A1:AB1). -- I would like these to be bold.

Then from A2:wherever the data ends I would like to have different
color background on the alternating rows (if A2:AB2 is white, I'd like
A3:AB3 to be grey, and so on)

Does anyone have any code for this?
Thanks,
Ninel


--
ninel
------------------------------------------------------------------------
ninel's Profile: http://www.excelforum.com/member.php...o&userid=33202
View this thread: http://www.excelforum.com/showthread...hreadid=530209


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling a macro from ActiveX Script. Karunakaran Excel Programming 1 May 2nd 05 12:53 PM
VBA script ActiveX .ocx embedded Mary Excel Programming 12 March 1st 05 02:41 PM
Excel 2000/XP script to Excel97 script hat Excel Programming 3 March 2nd 04 03:56 PM
Conditional Formatting script Andy Excel Programming 3 December 20th 03 02:20 PM


All times are GMT +1. The time now is 05:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"