#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default CSV to XLS

Hi,

I have csv file created by our legacy system.
User wants to following features to it so whenever user
opens it in excel.

1.first two rows should be filled with light yellow color.
2.should freeze pan from 3 row
3. should have auto filter enabled on all the columns.

Pl. help me in achiving this as I am new to excel
programming.
Ver. Excel 97
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default CSV to XLS

Use the macro record feature and perform the steps you have outlined.
Review the code and edit it if necessary.

Than use this new macro.

steve

"Puneet goel" wrote in message
...
Hi,

I have csv file created by our legacy system.
User wants to following features to it so whenever user
opens it in excel.

1.first two rows should be filled with light yellow color.
2.should freeze pan from 3 row
3. should have auto filter enabled on all the columns.

Pl. help me in achiving this as I am new to excel
programming.
Ver. Excel 97



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default CSV to XLS

Thanks Steve

If you donot mind can you give me more directions and if possible a
sample macro code....

Thanks



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default CSV to XLS

Puneet,

The code below was derived by using the macro recorder.

From the Tools menu, select Macro, than select Record.
A dialog box will appear asking for a macro name and location. You can
give it a special name and specify which workbook to store it in (or
not).

Than just go through the steps you want. At the end just click the Stop
Recording button.

Use Alt+F11 to go the VB Editor and you can view and edit the macro.

The code I recorded had a few "select" and "selection" keywords. I got
rid of those as they are not really needed.

Just copy this code and paste it into a macro module.

Sub Macro2()
'
' Macro2 Macro
' Macro recorded 8/1/2003 by Sbell
' Rows("1:2").Select
Range("A1").Select
' color 1st 2 rows light yellow
With Rows("1:2").Interior
.ColorIndex = 36
.Pattern = xlSolid
End With

' freeze panes on 1st 3 rows
With Rows("4:4")
ActiveWindow.FreezePanes = True
End With

' enable AutoFilter
Selection.CurrentRegion.Select
Selection.AutoFilter

Range("A1").Select
End Sub

steve

From: Puneet goel
Date Posted: 7/30/2003 11:43:00 AM

Hi,

I have csv file created by our legacy system.
User wants to following features to it so whenever user
opens it in excel.

1.first two rows should be filled with light yellow color.
2.should freeze pan from 3 row
3. should have auto filter enabled on all the columns.

Pl. help me in achiving this as I am new to excel
programming.
Ver. Excel 97

From: steve
Date Posted: 7/30/2003 3:31:00 PM

Use the macro record feature and perform the steps you have outlined.
Review the code and edit it if necessary.

Than use this new macro.

steve

From: Puneet Goel
Date Posted: 8/1/2003 7:16:00 AM

Thanks Steve

If you donot mind can you give me more directions and if possible a
sample macro code....

Thanks


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
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



All times are GMT +1. The time now is 10:43 PM.

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

About Us

"It's about Microsoft Excel"