Moving Inserted Picture After It Has Been Cropped

Nov 14, 2013

My code is:

Code:
Sub Insertwinds1()
ppath = "winds.webimage.url"
With ActiveSheet.pictures.insert(ppath)
.left = Range("A2").left
.top = Range("A2").top
.ShapeRange.PictureFormat.CropRight = 70
.ShapeRange.PictureFormat.Cropleft = 130
.ShapeRange.PictureFormat.CropTop = 300
.ShapeRange.PictureFormat.CropBottom = 90
End With
End Sub

This takes the image from the web (which is fairly large), moves it to Cell A2, and then Crops out the extra space I don't need showing. When this Macro is finished, due to the large Crop size, the image is in the center of the screen and nowwhere near the A2 cell. Is there a simple addition I can add to this code to move it back to a specific cell (a2) after it's been cropped? or move it via placement on the sheet (13, 13, 600, 600)? My old code I was using for this was:

Code:
Dim MYPICTURE As Shape
Set MYPICTURE = Activesheet.shapes.addshape(msoshaperectange, 13, 13, 600, 600)
MyPICTURE.fill.userpicture "winds.webimage.url"
End Sub

This one inserted the image, placed it in the specific spot... but I can't get that one to crop it, which is why I started over with teh first code.

View 5 Replies


ADVERTISEMENT

Resizing Picture Image To Fixed Height And Then Cropped Width

Jan 24, 2014

I'm trying to make this macro work to resize images for our fashion Look Book. In theory, it should work. But of course it does not Here is the code we are using:

Code:

Sub BIGcrop()
Selection.Height = 507.6
x = Selection.ShapeRange.Width
y = x / 2
Z = y - 144

[Code]....

I want all my pictures to have a height of 7.05 inches and a width of 4. The height comes out different everytime depending on the scaling of the template I'm using. I need it to adjust accordingly. I'm open to having the image move into merged cells, as long as it will first adjust the height and then crop the sides (so the orientation stays the same).

View 4 Replies View Related

Inserted Picture Disappears After Losing Focus

Aug 22, 2008

I have the same problem as Paul C in the following post:

(Pictures disappearing)
"Hi not a VBA problem, but when i insert pictures or logos into my workbook they disappear, i can insert a picture close the workbook but when i re-open it the picture has gone, i have to click on where it should be to get the border to appear, the move it to get it to appear.

I have tried inserting BPMS, JPGS, GIFS, but i have the same problem with them all, I have used the bring forward command but still have the same problem, I have even tried re-installing Office 2003 and installing all the latest updates but still get the same problem, any ideas?"

I have tried:

- Tools > Options > View > Objects > Show All
- Changing macro security level
- disabling macro security in my antivirus

View 9 Replies View Related

Inserted A Listbox And Based On The Value Selected A Picture Should Be Poped

Jul 12, 2009

I have inserted a listbox and based on the value selected a picture should be poped. I have searched the forum and got the code below. But it is throwing an error message "object required"

Private Sub ListBox1_Change()
If ListBox1.Value = "x" Then
Pictures("Picture 1").Visible = True
Else
Pictures("Picture 1").Visible = False
End If
End Sub

Then i modified it to

Sub ListBox1_Change()

If listbox1.Value = "1" Then
activesheets.Shapes("Picture 1").Visible = True
Else
activesheets.Shapes("Picture 1").Visible = False
End If
End Sub

View 9 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

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

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

Moving And Deleting Entire Rows Between Tabs In Workbook And Moving Them Back If Needed

Sep 23, 2013

I have an excel work book with 6 tabs. I would like to have Excel move an entire row from one tab to another tab (removing the row and inserting it in the other tab). I.e. Example I have a tab with items that are marked as "Open Actions" so if I were to change the drop down to close. Excel would move that entire row of actions to the tab with the "closed actions" and insert into the next available row. Now if someone were to come back at a later date say no it should be reopened than I would change the drop down to open and excel would move that row back to the open actions tab into next available row. I tried a PIVOT table and no good I played with few macro and not.

View 5 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

Keep Formula When New Row Is Inserted?

Jun 16, 2014

I have a formula in Sheet1 column H that I need to appear in the cells when the button is clicked (the button inserts a new row).

View 1 Replies View Related

VBA To Highlight Inserted Row?

Jul 7, 2014

Below is some code I am trying to complete but ot does not ALL work.

I am inserting a row and I want the row to be highlighted.

The insert part is working ok but not the highlight part.

[Code].....

View 2 Replies View Related

When Row Inserted - Popup

Nov 2, 2007

I'm trying to write a code (and I have little to no knowledge of VBA!) so that when a line is inserted onto any worksheet in the workbook a msgbox appears....

Trying to get it myself I created this- it's probably COMPLETELY wrong, like I've mentioned I have little to no knowledge and just using websites/other codes I've seen to put this together... o.O

View 12 Replies View Related

Stop Vba When New Row Is Inserted

Apr 1, 2007

I wrote a code that when a change is made to a sheet the "=today()" formula is inserted to cell A for that row. My problem is that my spreadsheet keeps freezing whenever I insert a new row. Is there a code to stop running the code if a new row is inserted? Below is the only thing I have so far.

Private Sub Worksheet_Change(ByVal Target As Range)
Application. ScreenUpdating = False
With Cells(Target.Row, 1)
.Value = "=today()"
End With
End Sub

View 5 Replies View Related

Name Inserted Pictures

Dec 23, 2007

I have imported and deleted several pictures into my worksheet. I want to re- name or re-order my pictures. Right now, a new pictures is name "picture 4" when there might only be two pictures in the sheet. I want to rename to say "picture 2" as I have a macro that calls for "picture 2" I know this should be simple, but I don't know how to do this.

View 4 Replies View Related

Put Date In Cell B When Value Is Inserted In C / D Or E

Jul 1, 2014

[URL]

I got the code in the above link working for me, but how would I restrict it to a certain subset of Rows? It's overwriting headers and totals and other things I don't want to change in the worksheet.

View 14 Replies View Related

How To Find Out The Row Number Of The Row That Just Inserted

Jan 29, 2014

I have some code that sits behind the worksheet_change event that recognises that I have just inserted a row into the active worksheet and it is happily telling me that I inserted one row.

What I also need is the actual row number that I just inserted but I cannot seem to find the right syntax to return the value I need

View 4 Replies View Related

Run Macro When Comment Is Inserted?

Nov 6, 2012

how can i run a macro after a comment is inserted?

View 6 Replies View Related

VBA - How To Reference All New / Inserted Rows

Jul 20, 2013

I would like to atribute a property (like colour) to any new row inserted in the spreadsheet. I'm struggling to find the correct way to reference a all inserted rows.

View 2 Replies View Related

Sum And Count Until A Blank Row Is Inserted

Apr 12, 2007

I have a worksheet that I have to sum in one cell and count in another cell from A1:until it hits a blank cell. The thing is, I insert the blank row (only 1) in different places depending on the new data and where the cut off is. How do I do a sum formula from cell A1...until I hit a blank and a Count formula in cell B1: until I hit a blank cell?

View 9 Replies View Related

Copying Formulas From Above Or Below Row Into Inserted Row

Jul 15, 2008

When I insert a row in my table (below the headers, which are between rows 1 and 4), I want the formulas from the above row (or below row) to be copied down to my newly inserted row. I say "below row" as well in case I want to insert a new first row and want the formulas in the row underneath to be copied up.

e.g., formulas currently in the first row are:

Column A: =SUBTOTAL(3, $B$5:B5)
Column H: =IF((F5="N*"),(1),"")
Column I: =IF(((SUM(H$4:$H5))=(SUM(H3:$H$4))),"",(SUM(H$4:$H5)))
Column J: =I5

Any other values in the other columns should not be copied to the new row.

I also do not want my table to be scrambled if I should delete any particular row.

View 9 Replies View Related

Inserted Image Not Showing

Jan 5, 2008

I am trying to insert an image into a worksheet with no avail. Whenever I choose INSERT/ PICTURE/ FROM FILE and select the file, it doesn't show up. I moved the entire sheet to another workbook and it all my attempts showed up there. What is stopping me from inserting a picture from file? Also, inserting AutoShapes is completely greyed out (disabled)...

View 3 Replies View Related

Change Graphs Automatically When Row Inserted

May 25, 2014

I want the 2 graphs in "Graph" worksheet to change automatically when a row is inserted in "Data" worksheet . Every time i have to change the graph manually to contain the latest 20 days value. I want some offset or something which can be put in the range provided below to do the work.

Chart Data Range =Data!$A$1:$A$22,Data!$F$1:$F$2,Data!$L$1:$L$20

Legend entries (Series) - Series Name =Data!$F$1 ( this will remain constant everyday as this is a header field)

Series Values =Data!$F$2:$F$22 ( this should contain last 20 days range, for example if a next row is inserted tomorrow then it should automatically change to =Data!$F$3:$F$23)

Legend entries (Series) - Series Name =Data!$L$1 ( this will remain constant everyday as this is a header field)

Series Values =Data!$L$2:$L$22 ( this should contain last 20 days range, for example if a next row is inserted tomorrow then it should automatically change to =Data!$L$3:$L$23)

Horizontal (Category) axis series -Axis Label Range =Data!$A$2:$A$22 ( this should contain last 20 days range, for example if a next row is inserted tomorrow then it should automatically change to =Data!$A$3:$A$23)

Sheet attached : Devicess.xlsx

View 6 Replies View Related

Macro / VBA To Keep Formula In Newly Inserted Row

Apr 11, 2014

Here attached is my sample workbook:

Attachment 310920

My button inserts a new row into the table.

What I want is that everytime a new blank row is created, the formula in the Days in Situ column is there as well (but obviously the cells update depending with which ever row it's in.. eg below formula is row 10.).

View 4 Replies View Related

Inserted Pics Not Saving On PDF Export

May 7, 2014

When I run module 2 one of the first things it does is export the sheet to a .pdf - however sometimes when i am ready to tun this macro there are pictures inserted as signatures (some of my team dont have touch screens) - but when they run the macro and the .pdf file is created the inserted pictures are there. See the below code - the "bold" line is the line that i feel needs to be more specific...

this is the Macro code

[Code] ....

View 1 Replies View Related

Formula Is Not Working In Cell When Used Inserted With VBA?

Jul 16, 2014

I am trying to write formula in a cell using vba code, but i m not getting the expected one.

[Code]......

In the above code, i m trying to insert the formula where it fetches the address of a cell using some variables.

Here r = 1, c = 1 and resOffSet = 7

From the above code im expecting cell adress like A1 , B1 etc but i am seeing "0" in the cell value.

View 5 Replies View Related

Set Page Break Around Image Inserted

Aug 15, 2014

I am having no luck with trying to find a VBA code that will auto set my page break around an image I inserted. Is there a way to do this even? Furthermore, there is a possibility of inserting multiple images in which I would need each image put on a different page and have the macro set the page break around each image. So if I inserted two images then I would need the macro to set two pages and break each page around the image size?

View 1 Replies View Related

Going Down A Column Automatically Inserted When Adding New Row?

Jun 11, 2014

I have a formula in column G of a worksheet, however when a new row is inserted within the formula range, the formula does not continue in the new row.

Is it possible to make excel continue the formula without having to drag the formula down again?

View 6 Replies View Related

VBA Code To Use Same Cell When Row/Columns Inserted

Oct 21, 2008

I wanted the title to be " Dynamic Row And Column Index In Macro" but I wasn't allowed to write it so. However, I have macros where I write things like:

.Cells(138, 13).Value = Something

Now, if I add rows and/or columns in the worksheet, (138, 13) might not be the coorect coordinates anymore.

View 4 Replies View Related







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