Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-12-2016, 05:37 AM
VBAbeginner VBAbeginner is offline Border with random colors Windows 10 Border with random colors Office 2016
Novice
Border with random colors
 
Join Date: Sep 2016
Posts: 2
VBAbeginner is on a distinguished road
Default Border with random colors

Hey,



I want to create a macro, which automatically creates a random colored border on every single page of the document. Random colors come from a set of 10 or so colors.

I can't manage to find an event for the creation of a new sheet, so this is my alternate plan:

- Button on page 1
- Macro for the button does:

-- Delete all rectangles in document
-- foreach page
--- create rectangle in 0,0 with 5cm width, 29,7cm height
--- set a random color from color set

Is there an easier way than deleting all existing rectangle shapes and adding one to each page?

Can anyone give me a snippet for the rectangle creation with the specific coords and for the creation of the color set and selection of a random color?

Thank you very much!
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Border with random colors Aligning Page Border with Table border without losing formatting :mad: l39linden Word Tables 5 10-04-2013 02:06 AM
Border with random colors Bar colors ketanco Project 1 03-30-2013 08:24 AM
Border with random colors Unable to change font colors from theme colors choy Word 3 08-01-2012 09:12 PM
random pop up wont go away 464646 OneNote 0 05-01-2012 04:34 AM
Only Random Border Lines Printing! TheCatSpeaks Excel 4 05-17-2010 07:39 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:16 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft