Set ConnectorFormat Start & End To Selected Shape
Sep 19, 2007
I have two Textboxes created from the drawing toolbar, named "FlowChart1", "FlowChart2". Below is a simple macro I recorded and modified which connects these two textboxes.
Sub FlowChartConnection()
ActiveSheet.Shapes.Range( Array("FlowChart1", "FlowChart2")).Select
ActiveSheet.Shapes.AddConnector(msoConnectorCurve, 149.25, 146.25, 159.75, _
257.25).Select
Selection.ShapeRange.ConnectorFormat.BeginConnect ActiveSheet.Shapes( _
"FlowChart1"), 3
Selection.ShapeRange.ConnectorFormat.EndConnect ActiveSheet.Shapes("FlowChart2" _
), 1
End Sub
Although it works fine... A problem I am having is that I am working with multiple (duplicated) flowcharts. Currently, the connection is based on the name of the objects. If I duplicate both textboxes and run the macro, the connection will connect to the first set of ( already connected) textboxes.
Q. Is it possible to form a connection based on active selection rather than the name of the objects? ie: if any two textboxes are selected.. connect these two objects.
View 2 Replies
ADVERTISEMENT
Dec 15, 2013
How to turn off or default the warning box message ...
"Data on the Clipboard is not the same size and shape as the selected area. Do you want to paste the data anyway"
I hate having to click yes on this every time I paste something. I do it hundreds of times a day.
My tables is centered and merged because my external date changes sizes each time I paste to the table.
I have looked all over to try and find an "OFF" warning/message button for this. I just want to know how to turn it off or default it to never pop up again!
View 4 Replies
View Related
Jan 28, 2013
I am trying to write a simple macro that would start a timer (in hh:mm:ss format) when the cell is selected. In other words, if I have the following:
Row Col B Col C
1 00:00:00 (form btn)
2 00:00:00 (form btn)
3 00:00:00 (form btn)
I would like to select B1 to start a timer and C1 (button) to stop the timer for that row.
I was given code from another IT guy but the problem with this code is that I have to write multiple macros by just switching out the cell number (in this example = [C4] )
I would like to have the macro use the selected cell as input parameter in the line that reads Set count = [C4].
Dim CD As Date
Sub RunTime()
CD = Now + TimeValue("00:00:01")
Application.OnTime CD, "Counter"
End Sub
[code].....
View 2 Replies
View Related
May 29, 2009
I need some assistance taking dates entered in a userform and applying them to the sheet 'Completed_Report' cells Q1 and R1. The userform code that stores the input values is:
View 2 Replies
View Related
Mar 4, 2009
when i run the below code i get an error 438 'object doesnt support this property or method'
View 2 Replies
View Related
May 23, 2007
how to include a line of code, to start a sub running at a selected time? Given that the workbook is already opened before that time?
View 6 Replies
View Related
Jan 24, 2014
On the attached spreadsheet there is two irregular shapes. "Area1" & "Area2". I need to be able to determine which area the "ball" shape is located in. If the ball is in Area1 then "Multiply 8" gets the ball and "Multiply 9" moves to the blue cell "AH39". If the ball is in "AreaB" Multiply 9 gets the ball and "Multiply 8" runs to cell "S37"
I should be able to do the moving of the shapes using all the samples, its determining which area the ball is in is the problem.
In the real spreadsheet i will probably have around 10 different Areas.
Move Two Objects - Select Case.xlsm‎
View 5 Replies
View Related
Jul 25, 2014
I am using this code to hide or unhide rows of text on another sheet:
VB:
Sub ProcessSheet1ChangeOnCellJ7(ByVal Target As Range)
Dim sAddress As String
Dim sValue As String
'Get the address of the cell that changed without '$' signs
sAddress = Target.Address(False, False)
[Code]....
When the "Not Pursuing" list box option is selected (in cell "J7" or "J8" in Sheet 1) I need to add (or over-write) "Not Pursuing" to the range of cells in column "B" (in the "Tasks" sheet), but only for that particular Goal, meaning a limited range of cells in column "B". If the "Pursuing - Show All Tasks" option is selected for a Goal then these same cells need to be blank so that the appropriate person can enter their name into the cell.
The purpose for adding "Not Pursuing" automatically to these yellow highlighted cells is that it will facilitate filtering of tasks by individual in the "Tasks" sheet..
Again I have tried several times to upload a sample file and am unable to, which I know makes it more difficult to solve. (Is there some common mistake people make? I know it's an allowed format and is very small in file size....)
Code solution can be entered directly beneath:
VB:
If Target.Value = "Not Pursuing" Then
ActiveWorkbook.Sheets("Tasks").Rows("29:29").EntireRow.Hidden = False
ActiveWorkbook.Sheets("Tasks").Rows("30:48").EntireRow.Hidden = True
View 1 Replies
View Related
Jun 23, 2009
I have D4=0.42. I thought this formula =IF(D4<0.38,"Thin",IF(0.38<D4<=0.48,"Good shape","Bad shape")) was supposed to give me "Thin" for D4<0.38, "Good shape" for 0.38<D4<=0.48 and "Bad shape" for the contrary, but it only gives me "Bad shape" when D4 is clearly between 0.38 and 0.48.
View 4 Replies
View Related
Oct 10, 2006
Basically it is a if statement saying that if the selected cell falls between 1/01/06 and 31/01/06 then Jan would be selected. The end part is not a problem; I’m just not sure how to write the one line of code that would test if the cell falls between the two dates. I attemped to create it as shown in the code attached below but wasn't successful. I used an else if statement to test the other 11 months.
Sub test()
Dim SelectDate As Range
Set SelectDate = Range("SelectedDate")
If selectedDate >= 1 / 1 / 2006 And selectedDate <= 31 / 1 / 2006 Then
ActiveSheet. PivotTables("PivotTable1").PivotFields("PnLDate").CurrentPage = _
"Jan"
ElseIf selectedDate >= 1 / 2 / 2006 And selectedDate <= 28 / 2 / 2006 Then
ActiveSheet.PivotTables("PivotTable1").PivotFields("PnLDate").CurrentPage = _
"Feb"........................
View 4 Replies
View Related
Aug 24, 2009
code doesn't work
Sub test()
If ActiveSheet.Shapes.Name = ("five") Then
Range("B4").Select
Else
Exit Sub
End If
End Sub
View 9 Replies
View Related
Feb 2, 2010
I have a shape in Excel called Canada. I grouped it with another shape and want this new grouping to be called Canada. But when I enter Canada in the shape name entry box, it doesn't actually change it (as it thinks I am referring to the existing Canada).
I need something like Names manager, but for shapes, not ranges.
View 9 Replies
View Related
Apr 1, 2008
Is it possible to find out if the selected item is a textbox through VB?
View 12 Replies
View Related
Jan 21, 2009
Is there any way that I can get the name of the shape i just clicked to call a procedure?
I have 35 shapes in my Worksheet.
Each shape has a different name. Each shape has a macro procedure assigned, wich do almost the same procedure (with just small differences, depending on from wich shape the macro was called).
I want to make just one macro procedure and catch from wich shape the macro was called.
View 4 Replies
View Related
Mar 21, 2014
How do i Keep shape where it is no matter if i scroll up or down.
Sub KeepshapeStatic()
Dim ws As Worksheet
Dim shp As Shape
Set ws = Sheets("Sheet1")
Set shp = ws.Shapes("MyShape")
'How do i Keep shape where it is no matter if i scroll up or down
End Sub
View 6 Replies
View Related
Jan 2, 2007
i am trying to draw a shape (square or rectangle) using vba textbox's i have managed to draw 2 of the 4 lines.
i am stuck on the ShapeRange.Flip msoFlipHorizontal codeing.
i have attached a example of what iam trying to do.
the coorinates from the last line enterd are saved to sheet1 for use with the next line entered ...
View 9 Replies
View Related
Dec 29, 2007
I want to create a shape connecting them and place that shape on a userform. I can create the area without any problems on a worksheet using ActiveSheet.Shapes.BuildFreeform but I don't know how to get it onto my userform.
I have looked through previous posts on similar topics and seen responses that it's as easy as copying the shape from the worksheet and pasting it into an image or frame on the userform. I can copy the shape to the clipboard without any problem. However, when I try to paste it onto an image or frame in a userform I get a message saying that the object doesn't support the use of paste. I've tried using both Selection.Copy and Selection.CopyPicture xlScreen, xlBitmap thinking it might treat a bitmap differently. When I paste I'm trying both UserForm1.Frame1.Picture.Paste and UserForm1.Image1.Picture.Paste but neither work, even though I have blank images and frames with those names on my form.
View 5 Replies
View Related
May 24, 2014
I have put a rectangle shape in a cell in excel. The shape is within the border of a particular cell.
Is there a way to find the reference of the cell on which that particular shape resides.
For example, I have kept a rectangle shape in cell F5. I was looking for a macro which would return the cell reference "F5" in which the shape resides.
View 6 Replies
View Related
Dec 13, 2013
I have a few dates and one Total value. I need to distribute this Total Value in such a way so I can get the same shape S curve (Date vs Value).
View 4 Replies
View Related
Dec 5, 2012
I really dislike the look of the command buttons and would like to use a nice flat-looking Shape into a functional button.
View 3 Replies
View Related
Jul 15, 2014
Is there any way to place a Control Tip for a shape on a excel worksheet?
View 3 Replies
View Related
Jul 18, 2014
How to draw multi Arc Shape in Union group Locks Like (Smiley Face 11)
View 2 Replies
View Related
Mar 12, 2009
I have a shape object which is created dynamically.
Now onAction event of the shape object, I need to get the cells row and column number where the shape object is sitting. How can i get it?
View 6 Replies
View Related
Mar 30, 2009
how do i check if a shape exists?
i have a shape created by a macro.
sShape
so when i get rid of this shape i use
View 3 Replies
View Related
Apr 2, 2009
How does one access the properties of a shape? For instance getting the text on a button ( from the forms toolbar ) on a worksheet. This works
View 4 Replies
View Related
Aug 4, 2009
Have an .xls file with multiple sheets and many objects (Shapes) on of those sheets.
The objects are all rectangles, some of which contain text frames, where I had entered manually some text.
Also, each shape has a name.
Now, I want my VBA Macro to take a specific shape (using its name), and find out if it has text frame in it.
View 11 Replies
View Related
Feb 10, 2010
How do I capture which hyperlink has been clicked (selected in any fashion)?
Then get associated shape name.
View 11 Replies
View Related
Feb 20, 2012
I have a macro which hides rows in excel. The lines that I am hiding have a "Rounded Rectangle" shape inserted with a hyperlink. I want the shapes to be hidden as well when I hide the rows. However, when hiding the rows, the shapes persist. Is there a way to hide the shapes as well?
I am hiding the rows via the following vba code...
If Range("CurrentVersion").Value = "1" Then
Rows("20:25").EntireRow.Hidden = True
Else
Rows("20:25").EntireRow.Hidden = False
End If
View 2 Replies
View Related
Apr 11, 2012
I am trying to get an inputbox name a shape within my workbook. This is what I have so far and i am getting a Run-time error ("The specific value is out of range") on the part in red.
Code:
Dim MyInput
Sheets("List Form").Select
ActiveSheet.Shapes.Range(Array("BlankTestButton")).Select
Selection.Copy
Sheets("For Copy").Select
Range("A36").Select
ActiveSheet.Paste
[code].....
View 3 Replies
View Related
Apr 12, 2012
I have many spreadsheets that use shapes such as arrows and other symbols. The process for these spreadsheets is to move the shape (arrow for Ex) to indicate a specific location of pain or something like that.
Once the arrow is in position, the spreadsheet is printed to PDF and and a snapshot (in adobe) is "taken" and the picture (with the arrow) is pasted into our application.
My questions is how can I move the shapes back into position when you want to do it all over again.
When I have a few shapes I use
PHP Code:
Set sShape = ActiveSheet.Shapes("Right Arrow 6") 2
    With sShape
       .Top = 220
       .Left = 91
       .Rotation = 20
   End WithÂ
For each shape
But if I have lots of shapes, 50+, it's a bit more cumbersome.
Can I loop through the shapes when I enable the macros to pick up the current positions and use that information when I do a reset (loop back again to move any shape that were touched back to where it was when the spreadsheet was opened?
Currently I have them close the spreadsheet without saving and just reopen.
View 3 Replies
View Related