You can use any valid picture that you wish. Here is a built in custom background designer using Excel's autoshapes. Download the workbook to see how it works. It simply resizes an autoshape to the visible range, takes its picture, and then sets that picture as the worksheets background. The third example shows how to use a group to design a background with a watermark.
Example Download: WorkSheetBackgroundDesigner.zip
<table width="100%" border="1" bgcolor="White" style="filter
rogid:DXImageTransform.Microsoft.Gradient(endColorstr='#C0CFE2', startColorstr='#FFFFFF', gradientType='0');"><tr><TD><font size="2" face=Courier New> <font color="#0000A0">Option</font> <font color="#0000A0">Explicit</font>
<font color="#0000A0">Private</font> <font color="#0000A0">Type</font> PicInformation
Length <font color="#0000A0">As</font> <font color="#0000A0">Long</font>
PicType <font color="#0000A0">As</font> <font color="#0000A0">Long</font>
Handle <font color="#0000A0">As</font> <font color="#0000A0">Long</font>
NotUsedHere <font color="#0000A0">As</font> <font color="#0000A0">Long</font>
<font color="#0000A0">End</font> <font color="#0000A0">Type</font>
<font color="#0000A0">Private</font> <font color="#0000A0">Type</font> GUID
Data1 <font color="#0000A0">As</font> <font color="#0000A0">Long</font>
Data2 <font color="#0000A0">As</font> <font color="#0000A0">Integer</font>
Data3 <font color="#0000A0">As</font> <font color="#0000A0">Integer</font>
Data4(7) <font color="#0000A0">As</font> <font color="#0000A0">Byte</font>
<font color="#0000A0">End</font> <font color="#0000A0">Type</font>
<font color="#0000A0">Private</font> <font color="#0000A0">Declare</font> <font color="#0000A0">Function</font> OleCreatePictureIndirect <font color="#0000A0">Lib</font> "olepro32.dll" (PicDesc <font color="#0000A0">As</font> PicInformation, RefIID <font color="#0000A0">As</font> GUID, <font color="#0000A0">ByVal</font> fPictureOwnsHandle <font color="#0000A0">As</font> Long, IPic <font color="#0000A0">As</font> IPicture) <font color="#0000A0">As</font> <font color="#0000A0">Long</font>
<font color="#0000A0">Private</font> <font color="#0000A0">Declare</font> <font color="#0000A0">Function</font> CloseClipboard <font color="#0000A0">Lib</font> "user32" () <font color="#0000A0">As</font> <font color="#0000A0">Long</font>
<font color="#0000A0">Private</font> <font color="#0000A0">Declare</font> <font color="#0000A0">Function</font> OpenClipboard <font color="#0000A0">Lib</font> "user32" (ByVal hwnd <font color="#0000A0">As</font> Long) <font color="#0000A0">As</font> <font color="#0000A0">Long</font>
<font color="#0000A0">Private</font> <font color="#0000A0">Declare</font> <font color="#0000A0">Function</font> IsClipboardFormatAvailable <font color="#0000A0">Lib</font> "user32" (ByVal wFormat <font color="#0000A0">As</font> Long) <font color="#0000A0">As</font> <font color="#0000A0">Long</font>
<font color="#0000A0">Private</font> <font color="#0000A0">Declare</font> <font color="#0000A0">Function</font> GetClipboardData <font color="#0000A0">Lib</font> "user32" (ByVal wFormat <font color="#0000A0">As</font> Long) <font color="#0000A0">As</font> <font color="#0000A0">Long</font>
<font color="#0000A0">Private</font> <font color="#0000A0">Const</font> CF_BITMAP <font color="#0000A0">As</font> <font color="#0000A0">Long</font> = 2
<font color="#0000A0">Private</font> <font color="#0000A0">Const</font> OLE_PICTYPE_BITMAP = 1
<font color="#0000A0">Sub</font> Example1()
Shape2SheetBG Sheet1.Shapes("Rectangle 1"), Sheet2
<font color="#0000A0">End</font> <font color="#0000A0">Sub</font>
<font color="#0000A0">Sub</font> Example2()
Shape2SheetBG Sheet1.Shapes("Rectangle 2"), Sheet2
<font color="#0000A0">End</font> <font color="#0000A0">Sub</font>
<font color="#0000A0">Sub</font> Example3()
Shape2SheetBG Sheet1.Shapes("Group 1"), Sheet2
<font color="#0000A0">End</font> <font color="#0000A0">Sub</font>
<font color="#0000A0">Sub</font> Example4()
Shape2SheetBG Sheet1.Shapes("Rectangle 4"), Sheet2
<font color="#0000A0">End</font> <font color="#0000A0">Sub</font>
<font color="#0000A0">Private</font> <font color="#0000A0">Sub</font> Shape2SheetBG(sh <font color="#0000A0">As</font> Shape, ApplyToWs <font color="#0000A0">As</font> Worksheet)
<font color="#0000A0">Dim</font> PicPtr <font color="#0000A0">As</font> Long, Pic <font color="#0000A0">As</font> IPictureDisp, IIG <font color="#0000A0">As</font> GUID, PicInfo <font color="#0000A0">As</font> PicInformation
<font color="#0000A0">Dim</font> OldWidth <font color="#0000A0">As</font> Single, OldHeight <font color="#0000A0">As</font> <font color="#0000A0">Single</font>
Application.ScreenUpdating = <font color="#0000A0">False</font>
ApplyToWs.Activate
OldWidth = sh.Width
OldHeight = sh.Height
<font color="#0000A0">With</font> ActiveWindow
sh.Width = .VisibleRange.Width
sh.Height = .VisibleRange.Height
<font color="#0000A0">End</font> <font color="#0000A0">With</font>
sh.CopyPicture , xlBitmap
OpenClipboard 0
<font color="#0000A0">If</font> IsClipboardFormatAvailable(CF_BITMAP) = 0 <font color="#0000A0">Then</font> <font color="#0000A0">Exit</font> <font color="#0000A0">Sub</font>
PicPtr = GetClipboardData(CF_BITMAP)
CloseClipboard
<font color="#0000A0">With</font> IIG
.Data1 = &H7BF80980
.Data2 = &HBF32
.Data3 = &H101A
.Data4(0) = &H8B
.Data4(1) = &HBB
.Data4(3) = &HAA
.Data4(5) = &H30
.Data4(6) = &HC
.Data4(7) = &HAB
<font color="#0000A0">End</font> <font color="#0000A0">With</font>
<font color="#0000A0">With</font> PicInfo
.Length = Len(PicInfo)
.PicType = OLE_PICTYPE_BITMAP
.Handle = PicPtr
<font color="#0000A0">End</font> <font color="#0000A0">With</font>
OleCreatePictureIndirect PicInfo, IIG, True, Pic
SavePicture Pic, "C:\Users\Tom\Documents\TempWsBg.bmp"
ApplyToWs.SetBackgroundPicture "C:\Users\Tom\Documents\TempWsBg.bmp"
sh.Width = OldWidth
sh.Height = OldHeight
<font color="#0000A0">End</font> <font color="#0000A0">Sub</font>
</FONT></td></tr></table><button onclick='document.all("1029200712813621").value=document.all("1029200712813621").value.replace(/<br \/>\s\s/g,"");document.all("1029200712813621").value=document.all("1029200712813621").value.replace(/<br \/>/g,"");window.clipboardData.setData("Text",document.all("1029200712813621").value);'>Copy to Clipboard</BUTTON><textarea style="position:absolute;visibility:hidden" name="1029200712813621" wrap="virtual">
Option Explicit
Private Type PicInformation
Length As Long
PicType As Long
Handle As Long
NotUsedHere As Long
End Type
Private Type GUID
Data1 As Long
Data2 As Integer
Data3 As Integer
Data4(7) As Byte
End Type
Private Declare Function OleCreatePictureIndirect Lib "olepro32.dll" (PicDesc As PicInformation, RefIID As GUID, ByVal fPictureOwnsHandle As Long, IPic As IPicture) As Long
Private Declare Function CloseClipboard Lib "user32" () As Long
Private Declare Function OpenClipboard Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function IsClipboardFormatAvailable Lib "user32" (ByVal wFormat As Long) As Long
Private Declare Function GetClipboardData Lib "user32" (ByVal wFormat As Long) As Long
Private Const CF_BITMAP As Long = 2
Private Const OLE_PICTYPE_BITMAP = 1
Sub Example1()
Shape2SheetBG Sheet1.Shapes("Rectangle 1"), Sheet2
End Sub
Sub Example2()
Shape2SheetBG Sheet1.Shapes("Rectangle 2"), Sheet2
End Sub
Sub Example3()
Shape2SheetBG Sheet1.Shapes("Group 1"), Sheet2
End Sub
Sub Example4()
Shape2SheetBG Sheet1.Shapes("Rectangle 4"), Sheet2
End Sub
Private Sub Shape2SheetBG(sh As Shape, ApplyToWs As Worksheet)
Dim PicPtr As Long, Pic As IPictureDisp, IIG As GUID, PicInfo As PicInformation
Dim OldWidth As Single, OldHeight As Single
Application.ScreenUpdating = False
ApplyToWs.Activate
OldWidth = sh.Width
OldHeight = sh.Height
With ActiveWindow
sh.Width = .VisibleRange.Width
sh.Height = .VisibleRange.Height
End With
sh.CopyPicture , xlBitmap
OpenClipboard 0
If IsClipboardFormatAvailable(CF_BITMAP) = 0 Then Exit Sub
PicPtr = GetClipboardData(CF_BITMAP)
CloseClipboard
With IIG
.Data1 = &H7BF80980
.Data2 = &HBF32
.Data3 = &H101A
.Data4(0) = &H8B
.Data4(1) = &HBB
.Data4(3) = &HAA
.Data4(5) = &H30
.Data4(6) = &HC
.Data4(7) = &HAB
End With
With PicInfo
.Length = Len(PicInfo)
.PicType = OLE_PICTYPE_BITMAP
.Handle = PicPtr
End With
OleCreatePictureIndirect PicInfo, IIG, True, Pic
SavePicture Pic, "C:\Users\Tom\Documents\TempWsBg.bmp"
ApplyToWs.SetBackgroundPicture "C:\Users\Tom\Documents\TempWsBg.bmp"
sh.Width = OldWidth
sh.Height = OldHeight
End Sub</textarea>