Hide Unchosen Objects/Shapes When Another Is Chosen

Nov 30, 2008

I work for Local Governments where supervisors want me to create Project Update program.

I've created one with VBA but still, cannot get the unchose color circles in the same row to become blank.

Whenever they choose one of the 3 color circles, 2 becomes blank.
I hope this will explain well enough for you to understand

here's the code I've put in and with the attachment, you can see my explaination.

Sub TimeRed()
doit 3, "D"
End Sub
Sub TimeYellow()
doit 6, "E"
End Sub
Sub TimeGreen()
doit 4, "F"
End Sub
Sub BudRed()
doit 3, "H"
End Sub

View 4 Replies


ADVERTISEMENT

VLOOKUP On Cells Which Contain Auto Shapes Or Drawing Objects?

Jun 11, 2014

how VLOOKUP can be used to look up cells with auto shapes or drawing objects with a number next to it. I keep getting the value in return but the auto shape/drawing object is omitted from the answer. I use Office 2013.

View 8 Replies View Related

Hide Drawing Objects

Mar 6, 2007

I'm looking to write two small macros that will either hide or show all lines, freeform lines, and autoshapes on a page. In my extreme competence, I determined a for/next loop would be appropriate... but other than that, I can't figure out where to start.

View 4 Replies View Related

Using Shapes To Hide Zeros

Oct 17, 2007

I want to write a macro that uses shapes to hide zeros; I have seen this done before but don't really understand how to set it up for myself.

On my sheet, there is a list of funds (Cells A4 to A79), a mixture of which will make up any given portfolio. Cell A1 houses a drop down list of portfolios. When I change cell A1, the numbers are automatically updated, as they are pulled from other worksheets in the spreadsheet. I want to be able to have the funds with zeroes next to them be automatically hidden. I believe there is a way to do this using shapes.

View 9 Replies View Related

Hide Objects In VBA Userform More Effeciently

Feb 18, 2011

I'm trying to hide a number of objects in a userform when a checkbox is checked. The code I have is below.

Code:
If CheckBoxAnnualIncrease.Value = False Then
FrameRentIncrease.Visible = False
LabelYear1Rent.Visible = False
TextBoxYear1rent.Visible = False
LabelAnnualIncrease.Visible = False

[Code] .........

View 6 Replies View Related

Hide And Show Objects In Userforms

Sep 18, 2006

I have a commandbutton that when clicked, it would make monthview1 visible. I can do this via the following

Private Sub CommandButton3_Click()
MonthView1.Visible = True
MonthView1.Value = Date
End Sub

However, I do not know what code to add so that when the same commandbutton is clicked, the monthview object would hide.

View 2 Replies View Related

Display Or Hide Shapes Based On Cell Value Without VBA?

Aug 8, 2012

I have a map of the US composed of 50 shapes (one for each state). I need each shape to appear or disappear based on a value in a corresponding cell. I can't use VBA for this as it needs to function for users in a high-security Excel 2003 which doesn't allow macros.

View 1 Replies View Related

Hide/Unhide Shapes Along With Rows/cells

Aug 18, 2009

I have an workbook with many sheets. each sheet contains loads of checkboxes, dropdowns, option buttons, groupboxes ... and they are created using a macro when the workbook is opened. all this works fine. Now I've grouped different rows based on their level of importance. Here's the glitch. whenever I select a group level, the rows get hidden, but not the shapes & objects present on them. Instead, they just jump to the row above or below and overlap the other shapes.

View 9 Replies View Related

Enable/Disable & Hide/Show Button Shapes

Mar 13, 2008

I am trying to allow uses of a spreadsheet to be able to select one control button which would in turn disable another one via check boxes however the control buttons do not re-enable when the undo check box is selected.

Sub Lead_REC()

' Set screen behaviour

Application. ScreenUpdating = False
Application.DisplayAlerts = False
Application.EnableEvents = False

' Defer error handling

On Error Resume Next
Err.Clear

View 3 Replies View Related

Macro To Hide Rows When A Check Box Is Chosen

Aug 26, 2009

Need a macro to hide two rows when a check box is checked? Is this even possible? I would like rows 44 and 45 to be hidden when the check box next to loan impairment is checked.

View 9 Replies View Related

Hide/Show Sheets Chosen In ComboBox

Feb 9, 2010

Sub ComboBox1_Chg()
For Each Sheet In Worksheets
If Sheet. Name <> "CoverPage" And Sheet.Name <> Sheets("CoverPage").ComboBox1 Then
Sheet.Visible = False
Else: Sheet.Visible = True
End If
Next Sheet
End Sub

It works if I step through it (F8) but the ComboBox doesn't work. It's named ComboBox1, and in the properties the ListFillRange shows all of the names in the list in the ComboBox correctly.

View 5 Replies View Related

Hide Specific Rows When Certain Value Chosen From Cell Drop-Down

Feb 22, 2009

Basicly I used conditional formatting and lots of "IF".My solution lacks in style and it's time consuming ..

Long story short: I need to modify the way some cells are displayed based on the selection in a specific dropdown list.

I need that whenI select Task3 from the dropdown list next to "step1: please select" , everything from row 15 to row21 (both 15 & 21 rows included) and from row 23 on, to disappear.

View 9 Replies View Related

Hide / Unhide Columns In Multiple Worksheets Based On Item Chosen In Dropdown List?

Feb 26, 2014

I am hoping to create a drop down list of months in one sheet, and when I select a certain month, columns in about 10 other worksheets in the same workbook will either hide or unhide columns...

The spreadsheet is laid out with columns (C-N) for each month in the year, for actuals, then columns for budget and budget variance (O-P), then YTD Actual, YTD Budget and YTD Variance. When I select September, for example, I want October-December to hide, and leave Jan-Sep unhidden, while keeping the budget, YTD and variance columns.

Is there a VBA code that can achieve this?

View 14 Replies View Related

Print Color Objects But Not Objects That Are Highlighted / Colored For Input And Grids?

Dec 27, 2013

So I'm creating a grid worksheet for engineering calculations and I have a couple questions about the best way to do it. I've been messing with excel for my calcs for about a decade now, and I every once in a while I try and improve them.

First: I will have several input areas that will either be colored text or shaded background (either works for me). I don't want these 'input required' objects to print as color, just black. But I want my logo at the sheet top to print as color. I've only found ways to not print any color. Can I print the logo as color and the 'input required' stuff as black?

Second: When I do calcs by hand, I write them out on 10x10 grid paper. Each 10x10 grid is one inch. In the past I've created this grid out of the cells, which works. I frequently need to change formulas around though, and each time I do this, I end up needing to mess with the grid cells also. Is there a way to create the grid and have it in the background so it doesn't need to be adjusted each time I change formulas? I wan't the grids to print, and also want to see them on the screen, as I sometimes draw simple objects along with the formulas.

View 9 Replies View Related

Creating Shapes (Rectangles And Shapes) From Input Cells?

Aug 30, 2013

Im trying to create shapes Rectangles and Squares with different colours within an excel sheet, where the length and height of the shapes is generated by input values.

Also is it possible to create 3D shapes, again where the size of the shap is generated by input cell values.

View 1 Replies View Related

VBA With Shapes

Dec 3, 2008

I have a macro that opens Word pastes data in from Excel,

I want to be able to paste an arrowed line that I have drawn, also if it changes, I want it to reflect that change.

Here's the
Item("Direction1").Range.InsertAfter Worksheets("BSID").Range("Line3").Value

I have my bookmark in Word setup, I'm guessing that instead of a cell ref I need the name of the Line, which is "Line 3" in this case.

I ran a recorded macro and copied and pasted the line and instead of "Range" I got "Shapes" so I assumed that I just needed to change these words but no joy.

View 9 Replies View Related

VBA Drawing Objects

Jul 15, 2008

I want to use VBA to update a drawing object's color, such as a circle.

For example, pretend I am counting sheep and I need to know when I have reached the maximum count by the visual aide of a stoplight. The script in my head reads: If the max. count of the sheep is less than 5, then the stoplight is green. If the max. count of the sheep is equal to 5, then the stoplight is yellow. If the max. count of the sheep is greater than 5, then the stoplight is red.

Is there a way to do such a thing on excel and with VBA?

View 9 Replies View Related

Different Objects In Loop

Jun 29, 2006

I created four Ranges called "Range1", "Range2", "Range3" and "Range4", and wrote short program, that fills them:

Dim i As Integer
For i = 1 To 4
Range("Range" & i).value = 1
Next i

Is it possible to do similiar thing with for example ComboBox?
Let's say that i have comboBoxes named "cb1", "cb2", "cb3" and "cb4" and want to disable them.

View 9 Replies View Related

Collections Of Objects

Jan 26, 2007

I ran into some difficulties by calling an object's function from a collection.

'BondIndex Class Module
Option Explicit
Private m_BondReturn As Collection
Public Sub Initialize()
Set m_BondReturn = New Collection
End Sub
Public Sub Load(BondPoints As Integer)
Dim i As Integer
Initialize
'Load Parameters of Bond
End Sub
Property Get BondReturn() As Collection
Set BondReturn = m_BondReturn
End Property................................

View 2 Replies View Related

Scripting Objects

Mar 22, 2007

If I hadn't read it on here, how would I have know that they existed? They are not mentioned in the standard Excel help files (not that I could see anyway).

What other "objects" are available? I had a look through the references in the VBE and there are literally hundreds on items which all look pretty "juicy". Does that mean there are a whole host of other objects that I could use in my Excel spreadsheets to either make them simplier or more powerful?

If so, where does one find any reference info on them?

View 3 Replies View Related

Set Objects To Nothing. Required Or Not

Dec 21, 2007

Why should I set objects to nothing (ie clear them) just before ending a sub routine? Doesn't excel dump the variables after the sub is finished running?

Example:

Dim ws As worksheet

Then at the end...

Set ws = Nothing

View 3 Replies View Related

Working With Shapes

Mar 24, 2009

Where do I find a tutorial or examples to show me how to create bars for gantt chart in excel, based on date values?

View 14 Replies View Related

How To Remove All Shapes

Nov 17, 2009

i have an excel file for using my manufacture planning. i dont know why but there was created too many TextBoxes(but its shapes)

I'm giving my excel file , you can see what i'm talking about at G column and 193. field
if you can solve this problem, i will be pleasure to you

View 10 Replies View Related

Deleting Shapes In VBA

Sep 18, 2012

I have some shapes on a worksheet that need deleting on change of a combo box. Unfortunately I'm unable to use the below code as not all the shapes need deleting, just the ones that are named in a table on another worksheet.

For Each s In ActiveSheet.Shapes
s.Delete
Next s

Also not all the shapes named in the table will be on the worksheet as this depends on what is selected from the combo box.

View 2 Replies View Related

Replacing Shapes With VBA

Aug 30, 2009

I am a not too good programmer, but I construct chemotherapy regimens for my medical department. They are used to minimise the risk of wrong dosing to patients, etc. Every regimen is an .xlt file, and about a third of them (there are about 100) generate, in addition to pharmaceutical prescription, automatic letters to patients (for those regimens where patients administer oral dosing at home).

These patient-letters have the hospital's logo on them (the logo is a "shape").

However, the problem is that another hospital also wants to use my system. So I will have to replace all these logos with the other hospital's. I would like to do this in an automated way. I have received the other hospital's logo also as a shape.

I have already constructed a data-inserting macro in a separate file. This macro systematically opens each xlt file and replaces the text in key locations according to the file the macro is in (geographical names, etc.).

Is it possible to automatically replace the logo-shapes in a similar way, with these additional facts/wishes in mind:

1. There is always only one type of shape (a logo) in the xlt files.

2. Even though the shapes are exactly the same, it is possible the names are different.

3. The exact location for the shape is different in each xlt file, so I'd like the replacement to get the same top left coordinate as the one it replaces.

I have constructed 2 different files with the same data-inserting macro, each containing one of the logos (so I can change back to my own hospital) and geographic data. When the data-inserting macro is used, I'd like it to identify the shape in the data-inserting file (there's only one shape in this file), copy it, then identify the shape(s) in the present xlt file, and then replace these, in the exact same location.

View 9 Replies View Related

Shapes With No Macro

Jul 10, 2006

I have a shape that will have no macro. How do I prevent this shape
from being selected and prevent the message that no macro can be found,
when it is clicked?

With shapes that do have macros how do I disable them ?
How do I keep them visible but not have the mouse cursor change on mouse
over and not have the macro run on a mouse click.

I tried to use Enabled = false but apparently that property cannot be used
for a shape.

I need to toggle between enabled and disabled.

View 9 Replies View Related

Delete Shapes On Specified Row

Jan 5, 2008

I have some drop down control boxes in rows that I want to be able to delete using a macro. If highlight the rown and use Edit, Delete, the data is gone but the controls are still there. How can I delete this using a macro?

View 3 Replies View Related

Locate And Delete Objects

Dec 31, 2009

In the attached sample workbook, (Excel 2007 format), there are hundreds, maybe thousands, of drawing objects and rectangles. They are mostly located near the top of column AC. You can't see any of them, because they are empty, or formatted to have no line and no fill, ubt if you move the cursor around in that area, it will eventually give you the option to "select" one of the objects. They appear to be stacked on top of each other.

This bloats the worksheet terribly. I have managed to shave the size of the attached sample down to 100K, bu deleting about 200 of the objects, but if I save this balnk file as an Excel 2003 file, it is 1.3 Mb.

I have discovered how to show what objects are on the worksheet, by selecting "Find and Select" and choosing to show the "Selection Pane". This pane shows hundreds of blank objects in the sheet. When this pane is open, however, if I try to select and delete an object, Excel locks up on me.

View 5 Replies View Related

Convert Objects Into Cell Value?

Feb 5, 2013

I'm not sure why they decided to export data this way but...I have a report that has pictures/objects that need to be in a cell so I can manipulate the data. I'm not really sure how to do this- and the only thread that related to this was over my head. This is not the original export- I've already done some sorting so the objects are all over the place- but basically if the object is C (picture 23) then I want that picture to say C in a cell somewhere. or if the picture is the dollar sign (picture 27) then I want a cell to say $. I don't know if I'm even explaining this right. Here is my workbook.

View 6 Replies View Related

Conditional Formatting Of Objects?

Jan 23, 2014

Is it possible to change colour of an object (Fill) say fill circle Red when A1="1" and Green when A1="0"

View 12 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved