Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Background colour using VB

hi
just after workbooks.add insert this:
Range("A2:M73:).interior.colorindex = 1 'black
:)
-----Original Message-----
I wish to make make the background colour of all cells

black prior to paste
of an invoice details. I code upto now is as below but I

need to add the
background colur and then wish to close the workbook with

code

Range("A2:M73").Select
Selection.Copy
Workbooks.Add
Range("A2").Select
Selection.PasteSpecial Paste:=xlValues,

Operation:=xlNone,
SkipBlanks:=False _
, Transpose:=False
Selection.PasteSpecial Paste:=xlFormats,

Operation:=xlNone,
SkipBlanks:=False _
, Transpose:=False

Application.CutCopyMode = False
Filesavename = Application.GetSaveAsFilename( _
fileFilter:="Excel Files (*.xls), *.xls")

If Filesavename < False Then
ActiveSheet.SaveAs Filename:=Filesavename,

FileFormat:= _
xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False _
, CreateBackup:=False

End If

End Sub
.

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
text and background colour Ruth Excel Discussion (Misc queries) 2 October 22nd 08 08:45 AM
change a cell background colour to my own RGB colour requirements Stephen Doughty Excel Discussion (Misc queries) 4 June 16th 06 01:08 PM
Countif background colour is..... ruthhicks999 Excel Worksheet Functions 3 March 14th 06 01:31 PM
How to filter using background colour? chrisk Excel Worksheet Functions 1 February 13th 06 03:38 PM
Background colour using VB Tom Ogilvy Excel Programming 2 September 15th 04 08:58 PM


All times are GMT +1. The time now is 12:22 AM.

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"