I'd like to change the color of shapes in a visio drawing programmatically...

How do i link a shape to a database and depending upon what the value is in 
that database, change the color of the shape?  (i need to do this for 
multiple shapes in the document so do i link the entire drawing and then 
either in VBA or the shapesheets, enter code for this.)  what would the code 
look like?  cheers!
0
jeff3752 (1)
6/17/2005 3:52:35 PM
visio 3638 articles. 1 followers. Follow

1 Replies
618 Views

Similar Articles

[PageSpeed] 25

You can update the formula in the shape.Cells("FillForegnd").Formula cell 
with either:
    a number from 0 to 23 (or more if you customise the color map)
    a valid RGB reference
    a valid HSL reference

If you have a grouped shape, then  you may need to enumerate through its 
sub-shapes too.

You could store your colors in a lookup table, and automatically update the 
color of simple shapes using the Database Wizard

Also, if you have Visio Professional 2003, then there is a Color Byy Value 
add-on undr Building Plan.

"jeff guthlaf" <jeff@spamisnotcool.com> wrote in message 
news:632f88041f5d4fbab48e6716214e2a41@ureader.com...
> How do i link a shape to a database and depending upon what the value is 
> in
> that database, change the color of the shape?  (i need to do this for
> multiple shapes in the document so do i link the entire drawing and then
> either in VBA or the shapesheets, enter code for this.)  what would the 
> code
> look like?  cheers! 


0
davidp1 (199)
6/17/2005 7:03:37 PM
Reply:

Similar Artilces:

I would like to
I would like to have the Sales rep printed on the receipt, how do I accomplish this? Craig, Download the Receipt - 40 column with Sales Rep from here; http://tinyurl.com/4gdbu You must have access to CustomerSource. -- * Get Secure! - www.microsoft.com/security You must be using Outlook Express or some other type of newsgroup reader to see and download the file attachment. If you are not using a reader, follow the link below to setup Outlook Express. Click on "Open with newsreader" under the MS Retail Management System on the right. http://tinyurl.com/75bgz ********** &qu...

External HDD Icons change.
Running Windows XP Pro. I have two external hard drives, both partitioned. They have now changed the icon to a "folder" when before they had a similar icon as my internal hard drive & opened in the same way (double-click) Now I have to open them like folders ie: with Windows Explorer. All help appreciated re; returning them to original state. TIA. You can create custom icons for your external hard drives as I do, so that when youy plugged in the drive its icon will different from the rest (easy identification). To do this: -Create your own icon, http://www.rw-design...

Advance Filter can be based on cell Color in Microsoft Excel
In MicroSoft Excel, Advance Filter (Data->Filter->Advance Filter) feature can be enhanced. New feature that we can introduce is to do Advance Filter based on Font/Highlighted Color. e.g. If in excel I have 10 Rows and 3 rows font color is RED and 7 rows font color is GREEN then using Advance Filter option we can apply filter based on Font Color or Highlighted Color. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you ...

Missing import filter for Word! Like "WordPerfect 5.1 (UNIX)" ...
I'm missing much import filter on Office-Mac (specially WordPerfect 5.1 UNIX for Word.mac). Office 95/97/2000/XP for windows have much more useful import filter. Why all this filter are missing in Office.mac????? Or are all them included in an additional package????? Hi Dieter, This question has been answered over and over again in the Macintosh Word newsgroup. Take a gander in that newsgroup for your answer. Office does not ship with a converter because a converter has not been built that does a good job with converting. Details are here: http://www.mvps.org/word/FAQs/General/WordP...

Making Excel act like a database.
I need some help on a common problem in our company. We have several clients that we have agreed to do some Excel 2003 spreadsheets for. The spreadsheets analyze our performance for them. These spreadsheets follow a very specific formatting that the clients have gotten use to and are unwilling to change. When we have to update the spreadsheets once a month, it can take all day to do the updating for each client because we are currently using copy and paste to get the data in the right cells. I'll explain more in a second, but what I am hoping to find out from this posting is alternate...

Replying to emails changes font
Very often when I reply to emails, Outlook changes the the font and fontsize of my signature from Tahoma 10pt to Times Roman 12 pt. Above the signature, where I write my message, the font is still Tahoma 10pt. The font of the sender is not necessarily Times Roman, it seems to pick a similar font. Sometimes it changes anyway even if the senders font is close Arial for example, it seems to do it randomly. I've tried to change it in all instances, Outlook, Word and IE but it has only been getting worse over time. Can anyone help, it's very annoying changing it more or less ...

Access 2007, Rich Text control. Cannot programmatically change font. Am I mad?
Hi all I have a rich text control (bound to a ntext SQL server field if that's relevant). All I want to do is press a button that will make sure that whatever text is in the control [SectionSummary] is changed to Arial 11. I have pasted some TNR 12 text into the box and when I press my test button the following code runs With Me.SectionSummary .FontName = "Arial" .FontSize = 11 End With The text is selected. The code runs but there is no change, the existing text remains TNR 12 Is there some magical incantation or is it just broken? Access has ...

Saving a high color image on a 256 color display
Hi, We have a tool (a MFC exe) that generates a bitmap for our splash screen. We run our build by logging on to a Win2k terminal server. Since the terminal server only supports 256 colors, the generated splash screen is color retarded. The tool basically does the normal, blt, DDB-DIB and save operations on the image. Can someone give me a pointer towards solving this issue? Thanks in advance, Lakshmi ...

Change a seconds value into mm:ss
I have a bunch of values in seconds (534.49 seconds, 649.87 seconds.. and so on) and would like to display them in minutes and seconds. I there an easy way to do the conversion -- Message posted from http://www.ExcelForum.com Divide by 86400 (put 86400 in an empty cell, copy it, select the values and do edit>paste special and select divide, format custom as [mm]:ss -- Regards, Peo Sjoblom "guilbj2 >" <<guilbj2.11h8qp@excelforum-nospam.com> wrote in message news:guilbj2.11h8qp@excelforum-nospam.com... > I have a bunch of values in seconds (534.49 seconds,...

My Headers are Spam Like
I have an Exchange 5.5 server on NT domain, the headers on messages say: received from <machine name>.<domain name> which is SERVERA.COMPANYB, and some sites are rejecting our mail as spam. I think it's a dns problem because SERVERA.COMPANYB doesn't resolve to anything. Is there any way I can get a .COM into that header? dlw wrote: > I have an Exchange 5.5 server on NT domain, the headers on messages > say: received from <machine name>.<domain name> which is > SERVERA.COMPANYB, and some sites are rejecting our mail as spam. > I think it's a...

color coding numbers in excel
is there a way to automatically change the font color for a set of numbers in excel. say i want to mark all numbers below 76 red? automatically that is Conditional formatting. See http://www.xldynamic.com/source/xld.CF.html#basic -- HTH Bob Phillips "Mackbeer" <addanUtostable@hotmail.com> wrote in message news:m7f0c11mdh5kc9qhs01tuahgpqhh0f51fm@4ax.com... > is there a way to automatically change the font color for a set of > numbers in excel. say i want to mark all numbers below 76 red? > automatically that is On Mon, 27 Jun 2005 19:04:16 +0100, "Bob Phil...

I cannot change name of folder sometimes
I have Windows Vista Ultimate. Quite often I try to change or update the names of a folder, and Vista would not let me allow, and I get dialog boxes telling me that I cannot have access, or do not have persmission, etc, and I get these denials even after I closed all the other files. It gets annoying that I get the "NO" after I already typed the new names. I am the only person who have access to this home PC. How can I change this so the computer will let me change names anytime I want to? Thanks in advance. I just tried again, and I got the Dialog Box tha...

color change
Env: WindowsXP, VC++6.00 By using SetROP2(R2_NOT), I draw a line on a bitmap. If the color of a pixel is not RGB(128,128,128), the line can be seen at this pixel. I hope the line can be seen even on RGB(128,128,128). I happen to get an application which can draw a line on any colors including RGB(128,128,128). And I notice that the conversion of color it uses are as follows, (128,128,128)=>(192,192,192) (192,192,192)=>(128,128,128) (0,0,0) =>(255,255,255) (255,255,255)=>(0,0,0) (255,0,0)=>(0,128,128) (0,255,0)=>(128,0,128) (0,0,255)=>(128,128,0) (0,255,255)=>(128,...

When edting a closed PO it changes the date. Should not change it
When you look at a closed po it changes the date on the last updated column. It should not effect anything unless does so by the operator. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/Community/NewsGroups/dgbrowser/en-us/de...

Can I get rid of conditional formatting but keep format changes?
In excel 2003 i have set up conditional formatting to change a range of cells fill color if it is equal to text in origonal cell. I want to get rid of the conditional format but keep the new fill color with out going through the cells one at a time and changing it manually. Is this possible? You might be able to do it with a macro e.g. Sub CdF() Dim cell As Range For Each cell In Range("B1:D10") If cell.Value = Range("A1").Value Then cell.Interior.ColorIndex = 36 End If cell.FormatConditions.Delete Next cell End Su...

Permission for account change
Dear Friends I have my domain as abc.com I have another domain xyz.com for which i have created a separate account for the users so that they can send the email with both the domain by using from filed. i have one user user1 who is facing problem i have created userxyz for with the default email address of xyz.com domain but i am facing strange problem as the permission of sending email is reseting. Kindly suggest what can be the problem. best regards Niitmalad What version of Exchange and how/where exactly it is resetting? Niitmalad wrote: > Dear Friends > > I have...

How do I change the x axis in a line chart
I have two sets of data and want to swap the y and x axes around. right click in chart select "source data" from the "series" tab select new values in the "name", "values", and "Category(x) axis labels" "Ric" wrote: > I have two sets of data and want to swap the y and x axes around. ...

COMBINING CELLS WITH LIKE DATA
I HAVE A SPREADSHEET TO TRACK INTERNAL MACHINING SCRAP SIMILAR TO THE ONE BELOW. I AM LOOKING FOR A WAY TO INSTANTANIOUSLY COMBINE ALL THE TOTALS FOR CUSTOMER A OR PART 13112 OR MACHINE B9 ON ANOTHER SPREADSHEET IF ANYONE KNOWS OF A WAY TO DO THIS PLEASE LET ME KNOW. THANKS. DATE CUSTOMER PART MACH # QTY TOTAL 8/9/2004 A 111 B9 2 13.46 8/9/2004 S 123 B9 4 26.92 6/4/2004 S 123 C14 5 31.95 6/1/2004 M 2131 C14 12 29.88 7/22/2004 B 13123 C3 1 0.75 7/5/2004 A 12312 C4 1 0.75 7/5/2004 ...

PO Print on Changes 2
We have frequent changes on open purchase orders. Occassionally when we send a change order to a vendor they will re-ship items on the PO that have already been shipped complete. Is it possible through report writer to prevent PO lines from printing if they have been fully received? We do not use SOP commitments on POs, so we have been able to key on the 'Qty Uncommitted in Base' within Smartlists to find the remaining open quantity on PO lines. Could this same key be used to affect printing? -- Jim@TurboChef Hi Jim, Check out Messenger by Liaison. www.liaisonsc.com. I...

Changing Attributes into Elements?
I have a class that I deserialize into as such: public class row { [System.Xml.Serialization.XmlAttributeAttribute()] public string RecordFound; [System.Xml.Serialization.XmlAttributeAttribute()] public string IsExpired; } When this gets serialized, the output looks like: <row RecordFound="1" IsExpired="0" /> What I'd *like* it to look like is this: <row RecordFound="1"> <IsExpired>0</IsExpired> </row> When I change the declaration of IsExpired to use XmlElement() instead of XmlAttributeAttribute() it just disappea...

Can I view image attachments in Outlook like they appear in Outlook Express?
Can I view image attachments in Outlook like they appear in Outlook Express, where they appear underneath the message body? Alternatively, can I "preview" them, rather than having to start up my image editing program just to see them? Thanks. No you can't view them inline. Have you tried changing the default program for opening images to your preview program so that it starts up automatically when you double click on an image attachment? "tasbill" <bill_griffin1@hotmail.com> wrote in message news:02c501c393c4$d8bc5480$a001280a@phx.gbl... > Can I view ima...

Send Brochure Electronically like It appear as if in print
I am re-posting this because someone replied to send as an attachment, but that doesn't have it appear as a 3 page panel brochure- does someone know how to do this (see below) I want to save my brochure so that it is not just 2 pages but looks like a 3 panel brochure that I would print -but I want to include it in an email and have it look like a 3 panel brochure is that possible. I was having trouble publishing to web-put I don't want to publish to a web page, just have someone who I want look at this brochure in electronic form but look at it as it would be if they received it if I...

How do I change where one of my e-mail accounts' mail goes to?
How do I change where one of my e-mail accounts' mail goes to? I don't want mp parents email mixing with mine! Either use the Rules Wizard to sort incoming mail items based on account or if you're using WinXP, setup a different user for yourself along with an Outlook configuration of your own "Steve" <Steve@discussions.microsoft.com> wrote in message news:55BD1633-58D9-443D-B641-0D680B23C5F4@microsoft.com... > How do I change where one of my e-mail accounts' mail goes to? > > I don't want mp parents email mixing with mine! ...

Changing the Account "Cash Flow" tracks...
I have multiple accounts that I track with Money Deluxe & Business 2002, but the "Cash Flow" feature points to only three of the five accounts and the one I wish to track isn't included...how do I change this? -- Ron On the pulldown for accounts on the Cash Flow Forecast off the Bills & Deposits page, there is one selection at the bottom called Multiple Accounts... It allows you to select which of your accounts to show. "Ron" <Ron@discussions.microsoft.com> wrote in message news:5F78B4D8-D868-4EA9-BFB5-4AAF1345337A@microsoft.com... >I have mult...

Change paste options?
Hi, I need to place a number of lines in a box. I create the first line then do a copy/paste but the next and all subsequent lines are placed with an offset. How can I control or change the paste location? For instance I want the pasted lines to move an increment to the left but remain in the same position as far as up/down orientation. I hope I was clear enough in my explanation!!!! Chris wrote: > Hi, > I need to place a number of lines in a box. I create the > first line then do a copy/paste but the next and all > subsequent lines are placed with an offset. How can I >...