Positioning A Picture

Jun 2, 2014

I've got the following code going :

[Code] .....

I can't get my With statement to work.

View 1 Replies


ADVERTISEMENT

List Box Positioning

Apr 10, 2009

I've got an Excel spreadsheet with quite a bit of code behind it (2007).
User can select a cell in Col A and push 'F2" and a ListBox pops up (becomes visible).
But if the User is on line 72 say, then the box is in the wrong position (and often becomes visible with diagonal lines across it!); that is I need to determine where the User is and set the ListBox position further down.

I tried to do this by calculating the offset based upon the row number they were on. This works really well, unless, the lines/records are varying heights.

Is there an easy way to do this ????? I have this feeling I must be missing something really simple about how this should work - I'm sure there must be a way that Excel has to handle this.

View 9 Replies View Related

Positioning Shape Objects In VBA

Aug 22, 2006

I am trying to work out how to pisition a new object in some VBA code, I can do this if I copy an object then click on a cell, e.g. H74 then paste, but the properties for an object want this in points.

ActiveSheet.Shapes.AddShape(msoShapeOval, 50, 50, 26.25, 26.25).Select

What I want to do is select the cell H74, then find the coordinates for that cell then use these when creating the shape, I appreciate these coordinates will need to be assigned to variables, but how do you get then from a given cell?

View 3 Replies View Related

Sizing And Positioning Of Shapes

Feb 14, 2007

I have a workbook where each name in a list has a picture of a flag of the country for that name. The flags are initially assigned to a cell with the country name (see sample attached). Later in the project the flag is copied to a cell in another sheet and assigned to the correct name in the list. The row heights in this list of names is larger than the row height of the sheet with list of countries.

The flags in the sample have been manually sized and positioned as accurately as possible. I am struggling with the VBA code to size and position each flag exactly so that there is a very small gap between the top, bottom and left of the flag and the cell border. Each is set to move and resize with cell.

View 2 Replies View Related

Positioning Of Validation Input Message

Apr 2, 2009

is it posible to control the positioning of the pop-up data validation input messsage box via vba? As often it obscures the view of critical cells below.
You can manually click and drag it to a desired position manually. Mana users are not aware of that. It would be desirable to reposition it elsewhere rogramatically.

View 2 Replies View Related

Resizing Charts And Positioning Legend

May 4, 2007

I have made charts in VBA charts that needs to be placed on specific position and have specific sizes on a chartsheet. I use plotarea (top, left, width, height) for that. Unfortunately when I set these values they keep chaning, there is some scaling going on in Excel and they won't get the specified size. I have been looking on the internet and finally I found a piece of code which works, but still not good enough, because the legend is also not good positioned

De data for resizing the new charts (ChtNew), the legends and the charttitle I get from other charts (ChtOrig). The legend.legendposition of ChtOrig does not have a value but it still have a top,left,height en width which I use.

I show you my code, the part with the for-next is taken from the internet.
I am trying to find a solution now for 3 days and now I only dream of huge charts (which is not good). So please can someone help me with this? This is the last forum, that I can try, I didn't get reactions from others.

with ChtNew.legend
.Top = ChtOrig.Legend.Top
.Height = ChtOrig.Legend.Height
.Left = ChtOrig.Legend.Left
.Width = ChtOrig.Legend.Width '* 1.1
.Top = ChtOrig.Legend.Top + ChtOrig.ChartTitle.Top
end with

With ChtNew.Plotarea
.Top = ChtOrig.PlotArea.Top
.Height = ChtOrig.PlotArea.Height
.Width = ChtOrig.PlotArea.Width
.Left = ChtOrig.PlotArea.Left

For i = 1 To ChtOrig.PlotArea.Top........

View 9 Replies View Related

Positioning Input Validation Message Box

Jan 9, 2008

I am using data validation input messages for data entry tips/definitions. The data entry cells are grouped in small tables (about 5 rows X 6 columns) so when the user clicks on a cell, the data validation input message box pops up next to the active cell. This covers the adjacent cells which need to be completed as well.

If I drag the message box over to right of the input table, the messages for the other cells stay in the new location as well. However, Excel doesn't remember this location the next time the workbook is opened.

Is there a way to set the location of the message box or some other way to achieve the same objective of having text boxes pop up in a defined location when a cell is activated?

View 9 Replies View Related

Auto Chart Positioning By VBA Or Other Settings

Aug 8, 2006

i try to change the chart position (chart properties) to make it auto- move to empty cells, but anyway i fail.

say example:-
i have a excel sheet,

Worksheet 1
------------
raw data, all records.


worksheet 2
-------------
1 pivot table + a graph/chart at the same sheet.

top area of worksheet is pivot table, below is chart.
The pivot table size can be change from time to time (by increasing the records at the worksheet 1)

settings or using vba to control it? by auto move the chart position down, and not overlap with the pivot table.

View 6 Replies View Related

Excel 2010 :: Paste Picture Into Small Picture / Diagram Box?

Mar 19, 2012

In Excel 2010, is there any way to paste a picture into a small picture/diagram box, and upon double clicking the picture it would explode to a larger size? And I guess double clicking it again would make it return to its original (smaller) size. I would be pasting several pictures into several different picture/diagram boxes and would need this to be a relative reference so that upon selection it explodes the appropriate picture?

View 1 Replies View Related

Copy Paste With Macros - Variable Positioning

Jul 12, 2007

Using a macro, how do I tell Excel to:

1. Copy the xth row and paste it before the yth row

2. Copy the mth column and paste it before the nth column

3. Copy the cell a,b and paste it in he position c,d
where x,y,m,n,a,b,c,d are variables, the value of which the user inputs, say in cells A1, A2, A3, A4, A5, A6, A7 and A8 respectively.

In other words, I need to read numbers m and n which are the values of cells A1 and A2, then I need to go to column number m (for instance, if m=4, I go to column D), copy the whole row, go to column number n (for instance, if m=6, I go to column F), and insert the copied column.

Also wondering if VBA provides any way to quickly horizontally and vertially flip copied tables while pasting. While I am aware of the transpose function which swaps rows with columns, I am looking for a way to reverse the order of either the rows or the columns as per my need, without having to copy-paste row-by-row or column-by-column.

View 9 Replies View Related

Zoom Level Affects Shapes Positioning

Jun 30, 2008

Sub CreateRectangles()
X = 1
Do Until ActiveCell.Offset(X, X).Value = 0
X = X + 1
Loop
variable = Round(-0.026 * (X * X * X) + 0.56 * (X * X) + 24.7 * X + 5, 0)

Set Box = ActiveSheet.Rectangles.Add(ActiveCell.Offset(0, 0).Left, ActiveCell.Offset(0, 0).Top, variable, variable)

With Box
.ShapeRange.Fill.Transparency = 0.3
.Font.Size = 18
.Font.Name = "Trebuchet MS"
.Text = ActiveCell.NoteText

End With

End Sub

View 3 Replies View Related

Put Chosen Picture In Comment & Retrieve Picture On Other Sheet

Nov 18, 2007

I want to have a sample file in excel which store picture of student in comment, I did this, but when I want to insert picture the file dialog appears, and if I click cancel, then there is an error, why? If some one optimise the code it would be very nice

View 6 Replies View Related

Excel 2007 :: Control Positioning And Size Of Window?

Mar 13, 2012

My set up office 2007 win xp pro ie 8 I am using the code below to retrieve web pages etc it works fine, however it display in differ areas of the screen, so I was wondering if there is a way to control the positioning and the size of the window?

Code:
Set EXP = CreateObject("InternetExplorer.application")
EXP.Visible = True
EXP.Navigate (aurl)

[Code]....

View 2 Replies View Related

Positioning A Specific Cell In The Upper Left-hand Corner

Jul 31, 2006

Is there a way (in VBA) to position a specific cell of a worksheet in the upper left-hand corner (i.e. cell H40)?? I have some code that I'd like to have do this.

View 3 Replies View Related

Display A Picture In A Cell When The Picture Name Is Selected

Jun 18, 2014

I have done the above where when I select a picture name from a drop down list it displays the relevant picture in another cell by using the IF function in the named formula

My question is why cant I use VLOOKUP instead of IF in the named formula. When I use it it comes with an error.

View 6 Replies View Related

Write The Picture Name In Cell The Picture Will Appear

Jan 22, 2009

i have saved some pictures in my excel sheet.
in the next sheet i want that when i write the picture name the picture will appear as vlookup helps in the getting text and nos. can i do this with pictures or i tried to get to much from excel.

View 10 Replies View Related

Insert Picture From File Increases File Size More Than The Picture You Inserting

Mar 17, 2009

I am putting together a price list in excel and using images and hyperlinks to jazz it up a bit - what I am finding is that if I insert a 25KB GIF image, the excel file grows in size by over 100KB

why is this disproportionate growth happening and is there a way around it - I dont want my Price List growing too large but need the images....?

View 9 Replies View Related

Excel 2003 :: Put Picture Into A Cell And Get Picture Name From Another Cell

Mar 23, 2014

I want to paste/show a photo in a particular cell (D2) on a worksheet (called PP). I wish to delete any photo that may already be there in D2.

The picture's name (e.g. J-145.jpg) will be found in another sheet (called MP) in cell H1.

My pictures are stored in a folder (lets call it c:pictures) and the one I want has the same name (J-145.jpg).

I've tried many macros but none work.

View 14 Replies View Related

If True Show Picture 1 Else Show Picture 2

Dec 6, 2007

i m working on a mechanical project , I need to do some modifications to my XLS file that i aint familair with.

http://aycu36.webshots.com/image/348...0572870_rs.jpg

View 10 Replies View Related

Picture In A Picture

Mar 27, 2007

I have several pictures on a graph sheet (i.e. imported cliparts) which I am using as a key to describe outcomes. I also have a blank picture box which I want to show each of the key pictures depending on a certain value in a cell on another sheet.

In Picture1 i want: fx = If(sheet1!A1 = "Red",Picture2,Picture3)

View 9 Replies View Related

Can You VLOOKUP A Picture

Jan 19, 2007

If I had a series of pictures in a worksheet, how could I give them a value so I could use the vlookup function?

View 14 Replies View Related

Un-shrinking Picture

Dec 4, 2008

Is it possible after inserting a picture in Excel and then shrinking it to the cell size un-shrink it to the original size by clicking the picture or placing cursor on the cell?

View 4 Replies View Related

Picture Won't Delete

Jan 2, 2009

I am working with a spreadsheet created by a predecessor and there is a picture at the top of one of the worksheets. When I select the picture and hit Delete, it seems to work, but the picture is still there. When I move it around the worksheet and resize it, a copy with the same name ("Picture 47") remains in the spot I moved it from. When I delete the resized/moved picture, it deletes, but the picture still remains in the original spot.

When I record a macro and select the picture and hit delete - or even when I move the picture and resize it - the recorded macro is blank.

All of the pictures seem to be named "Picture 47"

View 6 Replies View Related

Picture On Mouse Over

Jan 26, 2009

Is there a way to have a picture set to a cell so when you put your mouse on it it will popup like the comments do.

View 2 Replies View Related

Add A Box To Insert Picture?

May 12, 2014

how i can add a box on my sheet when i click on it to open the insert picture (or open picture). I need this for my recipes. I try the Image (Image ActiveX Control) but i do not now how to make it work. Also i try to insert picture each time but it takes me time to move it and re-size it every time. I need a faster way to add my pictures fast and in the same position every time.

View 5 Replies View Related

Insert Picture

Sep 8, 2009

I'm trying to insert a bmp file- small picture into an excel file (sheet 4) in vba.

how do I select the picture and copy it into the excel file.

View 14 Replies View Related

Picture Macro ...

Oct 16, 2009

I copied this from another post and am having trouble getting it to work for me. I want to be able to run this macro, find a picture on my computer which could be located anywhere and then have it paste in specific cells.

Whenever I run this it lets me find the picture I want and when I select it I get error message that says "compile error" Syntax Error". It then does not put the picture on the sheet.

I tried to zip and attach the work sheet multiple times but keep getting error message and won't let me attach......"forum excel database has encountered a problem" ....

View 9 Replies View Related

Put A Picture Into A Formula

Sep 3, 2004

I would like to find out how to put a picture into a formula so that when: example if A1 equals a certain number then a picture will pop up on the worksheet.

So in otherwords - a picture will automaticly pop up - so I need a formula to include the picture.

View 9 Replies View Related

Load Picture

Feb 25, 2007

I have made the next code

Filename = Application.GetOpenFilename("JPG Files(*.jpg),*.jpg,GIF files(*.gif),*.gif")
If Filename = False Then
Response = MsgBox("Er was geen file gekozen!", vbOKOnly & vbCritical, "Er is iets fout gegaan")
Exit Sub
End If

Userform.Image1.Picture = LoadPicture(Filename)

Userform.Show
I can choose a picture and it will be vissible in the Userform.

The problem is it's not saved into the userform it self.
How can i make it so that when i choose a picture it's also the picture i see the next time i open the userform.

View 9 Replies View Related

Use Picture Name From A Cell

Nov 17, 2006

I have recorded a macro for inserting, sizing and positioning a product photo into a report. The photo file is in a directory containing many files. Filenames are alpha numeric codes with a .jpg extensions. I wish to be able to enter a different code into a spreadsheet cell which will be named and let the macro insert the proper photo from the files in the subdirectory.

Here is the code which was recorded and which brings up the photo for file "HGGA134.jpg ".

Range("B10").Select
ActiveSheet.Pictures.Insert( _
"C:Documents and SettingsRichard WrightDesktopNUEVOProduct PhotosHGGA134.jpg" _
).Select
Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 195#
Selection.ShapeRange.Width = 180#
Selection.ShapeRange.Rotation = 0#
End Sub

I need a way to change the "HGGA134" part of the code by having it reference a named cell in the report.

View 5 Replies View Related







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