Article ID: 131396
Article Last Modified on 10/11/2006
DialogSheets(1).SetBackgroundPicture ("")
You can use the SetBackgroundPicture method to set the background graphic
for a worksheet or chart. Because the SetBackgroundPicture method applies
only to the Worksheet object and the Chart object, you should receive an
error message when you use the SetBackgroundPicture method with the
DialogSheet object. However, the error message that should appear in this
case (if the dialog sheet is not protected) is the following:
Note that this error message correctly appears when you use the
SetBackgroundPicture method with a Module object.
Worksheets(1).Select
ActiveSheet.SetBackgroundPicture ("C:\Clipart\picture1.bmp")
-or-
Charts(1).Select
ActiveSheet.SetBackgroundPicture ("C:\Clipart\picture2.bmp")
Method 2: Apply the SetBackgroundPicture method to a Worksheet or Chart
object directly as in the following examples:
Worksheets(1).SetBackgroundPicture ("C:\Clipart\picture1.bmp")
-or-
Charts(1).SetBackgroundPicture ("C:\Clipart\picture2.bmp")
Microsoft provides examples of Visual Basic procedures for illustration
only, without warranty either expressed or implied, including but not
limited to the implied warranties of merchantability and/or fitness for a
particular purpose. This Visual Basic procedure is provided 'as is' and
Microsoft does not guarantee that it can be used in all situations.
Microsoft does not support modifications of this procedure to suit customer
requirements for a particular purpose.
setback
Additional query words: XL7
Keywords: kbcode kbprogramming KB131396