IIF statement to hide a graphic

How can I use IIF statement to display or hide a graphic?
0
Utf
3/3/2010 9:40:02 PM
excel.programming 6508 articles. 2 followers. Follow

1 Replies
486 Views

Similar Articles

[PageSpeed] 29

Hi Bob

If by Graphic you mean a chart.  Try this it will hide charts on a
page if a condition is not true.

Take care
Marcus


Option Explicit

Sub VisibleChObj()
If Range("B1").Value = 1 Then
    ActiveSheet.ChartObjects.Visible = True
  Else
    ActiveSheet.ChartObjects.Visible = False
End If

End Sub
0
marcus
3/4/2010 1:09:31 AM
Reply:

Similar Artilces:

IIF in qurey criteria
I am trying to add an IIF statement to my query criteria. I have a form with an option group (optRept)with 2 choices: 1. Give me all records where total sales > [Forms]![frmOrderRept].[txtSlsMin] (this a text box on the form to enter sales $ criteria) or 2. Give me all records where total sales <= [Forms]![frmOrderRept].[txtSlsMin]. When I run the query I am not getting the row returned that I should. The IIF state is as follows:IIf([Forms]![frmOrderRept].[optRept]=1,([tblSalesSumm].[TotalSls])<Val([Forms]![frmOrderRept].[txtSlsMin]),([tblSalesSumm].[TotalSls])>=Val([Forms]!...

If Statement Help
I'm trying to get this to work, and I'm wondering if an If statement is the most efficent way. Anyway. In one row, I have various numbers corresponding to weeks, week #1, week #2, week #3, etc. In a row right below that, I have a number corresponding to shipment quantity. City City 2 City 3 More Cities... Arrival Week 1 3 1 Shipment Quantity 500 400 300 I'd like to see how many total arrivals I'll have in a certain week. Week 1 should return 800 (500+300). Week 2 should return 400. Any h...

Download statements in Money 2000 broken in windows XP pro
I like some of the features in money 2000 so am still using it. I am having a hard time getting statements to download properly in XP pro. My bank works OK if I save the file first, but my credit card doesn't have that option, and does not work at all. I saved the file as a .csv, but am not sure if I can use it. Are there any patches available in windows or money to fix it? "Patti Wagen" <anonymous@discussions.microsoft.com> wrote in message news:2abc801c4660d$3e947060$a301280a@phx.gbl... > I like some of the features in money 2000 so am still > using it. ...

Downloading bank statements #2
Recently began getting an error message when downloading bank statements. The statement appears to be imported into money 2003, but I can't open or delete the statements. Have tried deleting internet temp files, but no change. Posted this message yesterday. No response so far. How do I fix this? >-----Original Message----- >Recently began getting an error message when downloading >bank statements. The statement appears to be imported >into money 2003, but I can't open or delete the >statements. Have tried deleting internet temp files, but >no change....

=IF statement
I have a column of numbers that I am trying to perform =IF statement on. I keep getting TRUE or FALSE in my cells. How do I actually get the number there instead of the TRUE or FALSE Thank you in advance Hi Dick here's some examples of how to use the IF function =IF(A1>10,A1,B1) displays the values in the cell references =IF(A1>10,2,5) displays the values 2 (if true) or 5 (if false) =IF(A1>10,A1*1.1,A1*1.05) if true, displays the value of A1 plus 10%, if false displays the value of A1 plus 5% =IF(A1>10,"Good","Bad") returns the text values Good...

Hiding the Navigation Pane
Hi I have the instructions on how to prevent the Navigation Pane from appearing when you open a database. Is it also possible to prevent all the Access 'tool-bar' at the top of the screen from appearing? Bob "Bob Matthews" <rgmatthews@orcon.net.nz> wrote in message news:4b690b02$1@news.orcon.net.nz... > Hi > > I have the instructions on how to prevent the Navigation Pane from > appearing when you open a database. > > Is it also possible to prevent all the Access 'tool-bar' at the top of the > screen from appe...

Hide from Exchange Address Book #2
I have an exchange 2003 server. W ewanted to hide certain administartive acount from appearing in the address list which we did. With these accounts hidden is there any way other than using the SMTP adress to send them. I have a few programs that send out Alert messages via Microsft Exchnage with OUtlook. I'm pretty sure can only send them out via SMTP addresses. True, if user object is hidden from address list you have to provide the (smtp) address explicitly. -- Bharat Suneja MCSE, MCT -------------------------------- "George Schneider" <georgedschneider@news.po...

2007 SP2 breaks Excel Graphics in Save as PDF
After installing Office SP2 it was discovered that when using Save as PDF in Excel 2007 SP2 with a workbook that contained graphs those graphs would be broken by page breaks in the output PDF. This is a bug I have seen internet postings on but have found no trace of being documented by Microsoft. Hopefully customers experiencing this issue can find this thread. If your workbooks in your enterprise are heavy on graphs this issue is HUGE (trust me) - because everybody wants to either print or have a PDF. The initial resolution to the issue is to remove Office SP2 rolling back to SP1. T...

Why when I use hide columns / rows the undo does not work.
When I put commands in the spreadsheet with the right click and view code, then following this, the undo command no longer works. However, after I remove the code it (the undo) works again. Can you explain? ===================================================== Private Sub Worksheet_Change(ByVal Target As Range) Set TestCell = Range("AZ19") TestValue = "x" If TestCell = TestValue Then Range("A18:a20").EntireRow.Hidden = True Else Range("A18:a20").EntireRow.Hidden = False End If End Sub ===============================================...

Adding to IF statements
For some reason I can't add these two IF statements together [=IF(AM7="Put"&AN7<$K$2;$K$2-AN7;AN7-$K$2)] [=IF(AM7="Call"&AN7>$K$2;$K$2-AN7;AN7-$K$2)] "Dubbs" wrote: > For some reason I can't add these two IF statements together > > [=IF(AM7="Put"&AN7<$K$2;$K$2-AN7;AN7-$K$2)] > [=IF(AM7="Call"&AN7>$K$2;$K$2-AN7;AN7-$K$2)] Also, why does this discussion board change my formula? I cut and pasted the formula from the cell but when it appears on this dicussion board it writes out quot for &q...

Getting Rid of Mis-named Investment from Online Statement
A sticky one here, folks: How do I get rid of a mis-named investment that appears in one of my online statements? I have several investment accounts that contain Microsoft Corporation stock. I have an Investment in MS Money named "Microsoft Corp" with the stock symbol MSFT. When I connect online, these accounts are updated with the current price of Microsoft stock. That works fine. However whenever I receive online updates for one of these accounts and go to update it, Money indicates there is a line in the statement for "Microsoft Stock". The number of shares ...

losing indents next to graphics
I am using Publisher 2002. I print a 20 page magazine for my nonprofit, printed on both sides on an HP8550gn. Two columns per page. Whenever I insert a graphic that overlaps the columns with the text wrapping, I lose the indent on the right side of the graphic, left side of the column. It is not just in the printing, it shows no indent on the monitor. I have to go in and move indent manually. This would be okay but what I see on screen is not what I get in print. Any help will be greatly appreciated. Donald AVM ...

Hiding Printing Dialog
When using the OutputTo method to generate PDFs in Access 2007, is there any way to suppress display of the "Printing" dialog box? Thanks, Simon ...

Database Mirroring and Insert Statement
In SQL Server 2005, in Dev environment, the application takes 10-15 minutes to insert 129,000 records but in prod it takes 2 hours. Dev is not set up for database mirroring but prod is set up for database mirroring. The database is identical and server hardware in prod is better. There is no other activity happening in prod. during that time. What could be the possible reasons. >The database is > identical and server hardware in prod is better. "Better" is a relative term. I frequently see installation where a test or dev environment has one single disk and a pr...

hide my name
When replying to an email or creating one from scratch how do i hide my name in the "from" field...thx fred <fdbjrgetridofthis@wowway.com> wrote: > When replying to an email or creating one from scratch how do i hide > my name in the "from" field...thx Are you saying you want the reply to be anonymous? -- Brian Tillman [MVP-Outlook] no, I don't mind if my email is revealed.. just my name. I have tried by removing it from the "User Name:" field in the email account but it continues to show up. I have also removed from the header informati...

Bank Statements
Hi, I need some help. I have been using Money 2004 and of course earlier versions as well. I reconcile my bank statements every month in money. The problem now is that I have to go back two years for old bank statements and I don't have them all in paper format any more. Does anyone know how to print you reconcilied bank statements from money? I have looked and can't seem to locate how to do this. Thanks, Debbie In microsoft.public.money, Debbie wrote: >I need some help. I have been using Money 2004 and of >course earlier versions as well. I reconcile my bank >stat...

Help with IF, AND & OR statements...
Hi all... Fantastic site you got here. :) I can't get this formula to work. =IF(AND(10>5; 10=(OR(3;6;8;22;10)));\"TRUE\";\"FALSE\" It returns false. How do I return TRUE? Best regards TecWiz -- tecwiz ----------------------------------------------------------------------- tecwizz's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1661 View this thread: http://www.excelforum.com/showthread.php?threadid=31475 What are you trying to do? 10 is always greater than 5. etc., etc. -- Don Guillett SalesAid Software donaldb@281.com "...

If Statement that Copies to another Sheet
I am not sure how to create an IF statement that does the following: If a cell is >1 then copy the contents of another cell onto another sheet. Can this be done? And does this make sense Thank you for your help!! :confused: --- Message posted from http://www.ExcelForum.com/ It can't be done - worksheet functions can only return values to their calling cells. However, you can put this in the cell in your second sheet: J1: =IF(Sheet1!A1>1, Sheet1!B1, "") which will display the contents of Sheet1!B1 if Sheet1A1 > 1, else will display a null string. In...

Be able to hide certain items between registers
It would be nice to be able to hide items from the lookup table on certain registers. For example, hide food items on a retail register and vice versa. ---------------- 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/dgbr...

hide row 5 if a zero in cell D5
To All The code below is copied from a reply (by Frank Kabel) to a previous post. It hides all rows with a zero in column D Sub hide_rows( Dim RowNdx As Lon Dim LastRow As Lon LastRow = ActiveSheet.Cells(Rows.Count, "D").End(xlUp).Ro For RowNdx = LastRow To 1 Step - If Cells(RowNdx, "D").Value = 0 The Rows(RowNdx).Hidden = Tru End I Next RowNd End Su Does anyone know how to re-write the code to hide row 5 if a zero is in cell D5 Thanks, btk Hi! Try Sub hide_row5() If range("D5").Value = 0 Then Rows(5).Hidden = True End Sub Al -- Message...

Find and replace multiple statements simultaneously? #2
Thank you so much RagDyer!! That's worked perfectly and it's going t save me so much time! I really really appreciate it - cheers! Lizzy -- Lizzy ----------------------------------------------------------------------- LizzyD's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1617 View this thread: http://www.excelforum.com/showthread.php?threadid=27636 Thanks for the feed-back. -- Regards, RD -------------------------------------------------------------------- Please keep all correspondence within the Group, so all may benefit ! -----------------------...

Interesting problem when hiding main window
I recently wrote a very small app that was heavily dependent upon some of our custom libraries. These libraries all assume a 'multiple document' app but all I wanted was a simple dialogue. Since I didn't want to rewrite all the libraries, I simply wrote a 'multiple document' app, 'hid' the main window (m_pMainWnd- >ShowWindow(SW_HIDE) on startup, and then called a do.Modal to my little dialogue box (which only had one button :) well, two buttons, if you include 'exit'). The problem is that 'SW_HIDE' also seems to not include a program icon on ...

Need help with a SELECT statement.
Hi, Give the info below. How can I concate multiple rows into single. Please see the desired results below. Thanks so much in advance. IF OBJECT_ID('Tempdb.dbo.#Temp', 'u') IS NOT NULL DROP TABLE #Temp GO CREATE TABLE #Temp ( [LoanNum] [varchar](8) NOT NULL, [ContactName] [varchar](50) NULL, [BelongsTo] [varchar](35) NULL, [ContactPhone] [varchar](15) NULL ); go INSERT INTO #Temp ([LoanNum],[ContactName],[BelongsTo],[ContactPhone])VALUES ('104402', 'Annie Rylke', 'Realtor', '239-810-3254') INSERT INTO #Temp (...

SHOW/HIDE Window
Hi, I'm using MFC to create one simple application with one dialog box. Question : How can i HIDE/SHOW this dialog box ? if HIDE, mean user cant see that application, but, that "test.exe" program still running. Appreciate any help. Regards Yeo You can use the ShowWindow API. -- Jonathan Wood SoftCircuits http://www.softcircuits.com Available for consulting: http://www.softcircuits.com/jwood/resume.htm "Yeo" <peteryeo@yahoo.com> wrote in message news:ubm%23ZqRIEHA.3476@TK2MSFTNGP11.phx.gbl... > Hi, > I'm using MFC to create one sim...

Hide "Save" and "Save as..." menu
Hi! I would like to know if is possible to hide the "Save" and "Save as..." option menus in the "File" menu and how do that. Thank in advance. Rui application.CommandBars(1).Controls("File").controls("Save").visible=false application.CommandBars(1).Controls("File").controls("Save As...").visible=false -- HTH Bob Phillips (remove nothere from the email address if mailing direct) "Rui Alvares" <rui.alvares@netvisao.pt> wrote in message news:newscache$5qczti$ic7$1@newsfront4.netvisao.pt... > Hi!...