Add Position Shape To Cell Location
Jan 15, 2008
i need to loop through a column of values and get each value
Dim LastRow2 As Long
Windows("SCFOutput.xlsm").Activate
Sheets("Q2SCNeg").Select
Columns("A:B").Select
ActiveSheet. Range("A65536").End(xlUp).Offset(1, 0).Select
LastRow2 = ActiveCell.Row - 1
For Each c In Worksheets("Q2SCNeg").Range("A2:A" & LastRow2).Cells
MsgBox ActiveCell.Value
Next c
i did this but it selects the first blank row (row 15) and gives me an empty message box 14 times (which is right, but i need 14 values) the reason i need the loop is because the number ov values will always change
View 2 Replies
ADVERTISEMENT
Oct 13, 2013
I want to resize a shape and set the height to a specific cell. How can I achieve that?
View 7 Replies
View Related
Nov 11, 2008
I require a macro to enable a selected shape to be moved from current cell location to relative position but 1 row up. eg topleft address = A4 and shift shape to topleft address = A3
View 5 Replies
View Related
Aug 6, 2008
I am trying to cut and paste an object (an excel shape to be more precise) into its same position. It could, for example, be relative to the top left corner, but how to modify the paste method will be welcome. Surely this is a piece of cake for most of you, but I haven't been able to find the answer for objects floating on the screen.
View 5 Replies
View Related
Jul 10, 2014
I have an autoshape on an sheet, and use this code (it's a circle), to rezise it....
[Code] ....
However, it does rezise it, but the shape doesn't keep it's central position. Is there a bit of code I can add to stop the shape from moving? In other words, have the shape rezise around it's center of location?
View 4 Replies
View Related
May 7, 2012
I'm messing around with two shapes, a Cannon and Cannon Ball. With code the Cannon rotates for the angle of fire. What I can't do is position the Cannon Ball at the end of the Cannon when Cannon is at an angle. Long time since I was in school so forget most of my maths.
Code:
Sub IamUseless()
Rem this is work in progress and in NOT WORKING!!!!!!!
Dim xDistance As Double ' is inital x position of object
[Code].....
View 1 Replies
View Related
Feb 15, 2007
I created a shape (rectangle). I assigned a macro to it, to activate another worksheet.
Can I fix the position of the shape on the screen, near the top. I have 700 rows in the worksheet and I want this rectangle always visible, near the top.
View 4 Replies
View Related
Jun 2, 2008
I have written a small piece of code that handles clicks on buttons on an excel spread sheet. When a button is pressed, i need to know the row number where the button resides in.
I have searched and read about this issue on several forums, and they all indicate that i need to use something like
application.caller.topleftcell.row
to get the row number and
application.caller.topleftcell.column
to get the column number.
However, when i use the row variant, it ALWAYS returns row number 1. When i use the column variant, it returns the column number it is actually in.
i have added the full code that is creating the buttons below, and also the part that displayes the rownumber that is incorrect.
Private Sub Workbook_Open()
Dim name
Dim time As Integer
time = InputBox("Typ the hour you are checking" & vbCrLf & "eg: 7, 10, 13, 14, 15, 16, 17, 18, 19", "Which Check")
View 9 Replies
View Related
Jan 7, 2009
Is it possible to position a predetermined cell (e.g. A42) in the top left corner of the screen. (Not every screen users use has the same size)
View 3 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
Oct 6, 2009
I am trying to develop a spreadsheet that will calculate a cost based on a matrix. I am attaching a sample of the calculation created so far. The end result is in cell M13 and is highlighted in yellow. I kind of layed the formula out in a few different cells, so hopefully it would be easy to follow.
simplify this process with maybe another formula that I might not be aware of, or maybe show me how to get this done in VB code. I think VB code would be the correct way to go just not sure.
View 6 Replies
View Related
Jun 23, 2008
Is it possilbe to change the shape of a cell to a circle?Or is there a way you can make a shape act the same as one of your cells?
View 9 Replies
View Related
Dec 8, 2012
With the following code I can get shape properties, but I can get it for the linkedcell of the shape.
VB:
Sub GetShapePropertiesSomeWs()
Dim sShapes As Shape, lLoop As Long
Dim WsNew As Worksheet
Dim wsLoop As Worksheet
Set WsNew = Sheets.Add
[Code] ....
View 1 Replies
View Related
Jul 22, 2014
I have a shape on one sheet. Need to change the name of a shapes depending on a value in cell from an other sheet.
View 6 Replies
View Related
Mar 30, 2014
I am trying to select a shape in a cell and place a cell reference into the shape. I know the cell address, but do not know the shape reference. (The row that the cell and shape reside came from copying the row from another sheet and inserting it into the current sheet). I can not seem to come up with the correct code to accomplish this. Right now I have:
Cells(r + 1, 48).Select
ActiveCell.Shapes.Select
ActiveShapes.Formula = "$AW:" & r + 1
Where r+1 is the row where the line finally resides after insertion and "AW" is the column to the right of the cell where the shape resides.
I have tried to put the cell reference into the shape at the location where it is copied from but the reference is not dynamic and I can not seem to get it to be. Another issue that will arise is that the rows in the new sheet will probably be sorted and I question if the cell reference will follow the shape's new location.
View 7 Replies
View Related
Mar 15, 2014
I have a couple of hundred string values in column A. I am trying to create the same number of rectangle shapes in column B, each one taking its name from the corresponding cell in column A. I keep hitting the dreaded 400 error code .
Attached File : test add shapes.xlsm
View 3 Replies
View Related
Jan 6, 2014
I'm tying to change a shape based on a cell value. I have this but it will not change fron green to red.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("A100").Value >= 0 And Range("A100").Value Range("A100").Value Then
ActiveSheet.Shapes("Oval 5").Fill.ForeColor.RGB = vbRed
End If
End Sub
I would like the shape to go red, yellow and green but I can't find anything that works.
View 1 Replies
View Related
Jun 14, 2007
I'm trying to make a circles size (diameter) change depending on a value inputted in a cell, preferable I would like to have a limit to the sizes too so if that the circle will not have a diameter larger than 20 or smaller than 2 regardless of the values put in. the sheet will have several circles.
I know this must be documented somewhere but I don’t think I’m using the right terminology in my searches,
View 9 Replies
View Related
Oct 18, 2007
It's difficult to explain, the attached shows the situation better. Basically there's a picture that is somehow linked to a cell. But, you can update the picture or the cell and the other one gets updated.
View 2 Replies
View Related
Apr 8, 2014
I have a tracking sheet that is used to show where a specific project is within the lifecycle and would like to automatically set a summary value depending on the last data entry within a range of cells in a row and also set it to RAG status depending on the value.....
View 2 Replies
View Related
Jan 29, 2014
I need to make a cell display the contents of the cell immediately below it, regardless of if there are rows inserted at the referenced row or above or below it on the worksheet. ALSO I need to do this at several additional cell locations down the worksheet. Such as : A1 displays A2, A4 displays A5, A7 displays A8 etc.
Example: I want A1 to display whatever is in the cell immediately below it. In this case A2. I need to be able to insert several rows at row 2 and have whatever new value is now in the A2 position displayed in A1.
After the rows are inserted I need the cell that was in position A4 to continue to display the contents of the cell below it.
I tried using the formula in A1 of: =INDIRECT("A2") and it works good except when I insert the rows my similar formulas below the area where the rows were inserted continue to refer to the specific original cell and not the one positioned now below it.
View 3 Replies
View Related
Feb 10, 2010
I had getting a hyperlink from a Shape to a Cell on seperate worksheets and the macro works fine:
View 4 Replies
View Related
May 28, 2008
I am trying to get different shapes (previously created) to appear in a certain cell, dependant on the resultof a formula in an adjacent cell.
View 4 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
Sep 25, 2008
How to know the position of third comma in the same cell.
View 14 Replies
View Related
Oct 9, 2013
have an assignment to complete and one of the tasks I found impossible to complete. First condition is that it should be completed with a formula (not VBA). So here is the task - I have different cells with IBAN codes in them. The 14th position in the IBAN is used to identify the currency of the account. There are 3 possible numbers - 0, 1 and 2 and each is for different currency. So I have this table where I need to lookup the 14th character in the cell with the IBAN, from there the formula needs not only to check what the number is (0,1 or 2) but also to compare it to another table from where to decide which is the currency. I tried various combinations with FIND/SEARCH but can't find a way to do it.. and I can't find other functions/formulas that can isolate a particular character position in a cell..
View 3 Replies
View Related
May 14, 2014
I have set up a rollover hyperlink so that when I hover over the cell it changes colour and creates a good effect. To do this I have another cell on the sheet that turns to 1 when the cell in question is hovered over.
I need a code so that when that cell displays the number 1. the object (which is rectangle 2) changes from white fill. to a picture I have saved on my desktop.
I cant quite figure out the coding and have been messing about with things like..
if cell range e.g a1 = 1 then rectangle 2 .userpicture " path " else .solid etc.
View 10 Replies
View Related
Jun 23, 2003
I now have this code that inserts a picture and then resizes it the active cell shape.
Sub InsertPicture()
Dim myPicture As String
myPicture = Application.GetOpenFilename _
("Pictures (*.gif; *.jpg; *.bmp; *.tif),*.gif; *.jpg; *.bmp; *.tif", , "Select Picture to Import")
If myPicture "" Then
ActiveSheet.Pictures.Insert (myPicture)
ActiveSheet.Shapes(ActiveSheet.Shapes.Count).Select
With Selection
.ShapeRange.LockAspectRatio = msoFalse
.ShapeRange.Height = ActiveCell.RowHeight
.ShapeRange.Width = ActiveCell.Width
.Placement = xlMoveAndSize
End With
End If
End Sub
View 9 Replies
View Related
Nov 18, 2007
I am looking for a macro that will copy the text-based contents of a random cell in the range B100:B135 to a callout text box. The name of the callout is Autoshape 13. The callout should be cleared before pasting the contents of the next random cell into it. This macro will be assigned to a button.
View 5 Replies
View Related
Jan 9, 2013
I have in the first column something like this:
GLOBAL DESCRIPTION
GLOBAL DESCRIPTION1 Particular description1
GLOBAL DESCRIPTION1 Particular description2
GLOBAL DESCRIPTION2
GLOBAL DESCRIPTION2 Particular description1
GLOBAL DESCRIPTION2 Particular description2
I want to to have in the second column:
GLOBAL DESCRIPTION1
Particular description1
Particular description2
GLOBAL DESCRIPTION2
Particular description1
Particular description2
So far I have this: +IF(EXACT(A1;UPPERCASE(A1));A1;+RIGHT(A1;LEN(A1)-(FIND(X;A1;1)-1)))
X standing for the position of the first lowercase, which I don't know how to get.
View 9 Replies
View Related