macro to copy background of a sheet

IgorDepecker

New Member
Joined
Jan 8, 2005
Messages
35
Hi all,

I ' m looking for VBA code to copy the background from a specific sheet to another. The background of a sheet is not included in "copy paste special formats" so this doesn't work. Somebody an idea ?
Txs ! !
Igor
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
I do not know how you can do that? See the SetBackgroundPicture Method in VBA help to dynamically load the background from a file.
 
Upvote 0
Hi,

if Tom doesn't know, who would ? perhaps Rafaaj2000 can invent some APIprocedure :)
the only workaround I can see, is this:

sheet2 needs background from sheet1
copy sheet "sheet1" (default name: sheet1 (2) )
clear "sheet1 (2)"
copy contents of "sheet2" to "sheet1 (2)"
delete "sheet2"
rename "sheet1 (2)" to "sheet2"


alternatively: if you want to do this often
when changing background, put the picture-path somewhere in a cell: you would only need to read the cell (and hope the picture was not moved )

kind regards,
Erik
 
Upvote 0

Forum statistics

Threads
1,214,400
Messages
6,119,284
Members
448,885
Latest member
LokiSonic

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top