Insert Photo VBA Minor Adjustment

Jun 29, 2009

I have Office 2007 and i use this code on my word.docm to insert selected photos. the problem I'm having is that it insert photo at top of page. can additional code be added so that it will insert photo in same table as command button. and in front of button, so that it will hide button

Private Sub CommandButton1_Click()
Dim sFileName As String
Dim ilImage As InlineShape
With Dialogs(wdDialogInsertPicture)
If .Name "" Then
sFileName = .Name
Set ilImage = ThisDocument.InlineShapes.AddPicture(sFileName, , True)
With ilImage
'set any additional properties such as left, top, etc., here
End with
Exit Sub
End If
End With
End Sub

View 9 Replies


Vba Shade A Cell Once Its Moved ( And Add New Rows Beneath ) Minor Code Adjustment

Nov 7, 2009

I've adjusted a jonmo code to add an item in col B which is not in col A to the bottom of col A. - fab code, thanks jonmo.

But.. i want to:

insert rows beneath those in column A to accommodate the added items and shade those cells in list A once they been added ( so the users now they've been moved )

I've posted the code below ( including my attempts at colour change where it shade the right cell but in the wrong column ) ...

View 9 Replies View Related

Insert Photo Using Code

Feb 20, 2010

I'm trying to find some simple code that would that would allow me to select a picture from the picture dialog and insert it to active cell at a small size, like 2 1/2 by 2 inches

View 4 Replies View Related

Having A Minor Issue With SUM And AVERAGE

Nov 16, 2008

I am having a bit of an issue with SUM and AVERAGE of a particular column. The sum is giving me zero total, and the average is giving me a DIV/0 error. Have a look at the attached spreadsheet. I am trying to sum and Average column "I", but as you can see, it is giving me a total of zero, and an average of "DIV/0" error. Also min and max calculations are not working for that column either. Obviously it has something to do with the formula or formatting in column I, but I am not sure what or why... The formula in column I works as I like it to.

View 3 Replies View Related

Adding Weight Major And Minor

Sep 15, 2014

I have two columns. One with the major weight(pounds and one with minor with ounces. The first column would have a 1 the second 8 for 1 lb 8 ounces which I need to combine to say 1.5 Every way I do it it is coming up with 10.5.

View 5 Replies View Related

Getting Photo Based On URL Macro?

May 26, 2014

I am working on a VBA code I found online. That will download a photo from a designated URL and input the photo in to a cell.

I am attaching a spreadsheet which has a URL in Colum C2 I would like to download the photo via the macro and input the photo based on that URL in to Colum b2.

I was using the following code

[Code] .....

However I am getting a weird error result.

View 1 Replies View Related

VBA Photo Code Question

Feb 26, 2009

Can someone do me a favor and explain this string of code to me?

View 12 Replies View Related

Similar Texts With Minor Differences - How To Get Just ONE (standard One)

May 26, 2014

I have a very large database that contains names with minor differences on column A such as:


As you can see, this makes a mess when dealing with numbers associated with them and makes analysis more difficult.

What I've been trying to figure out is how to quickly get in column B a standard name for each one, for example:


I was thinking of using a combination of the FIND and EXTRACT formula or maybe LEFT as well. (Maybe VB?)

View 6 Replies View Related

Excel Photo With Transparent Cells?

Jan 24, 2013

Is it possible to put a picture in excel with transparent "cells" like the attached. Where I could type in the actual cell in the transparent (white blocks) part of the photo?

View 4 Replies View Related

Formula / Algorithm For Identifying Minor Changes In Text Strings?

Feb 17, 2012

I have a database of approximately 250000 email addresses and I would like to see if there is some way to use Excel to analyse the strings in order to identify potential 'non-unique' individuals.

For example, if I have the following email addresses:

Is there some way of extracting common text strings, lets say where there is a difference of 1 character / digit between strings (rather than alphabetising and searching manually)?

View 2 Replies View Related

Excel 2013 :: Set Photo Path As Variable?

Mar 31, 2014

I have a macro that inserts a photo via a photo path that has been set as an object variable. This macro has always worked for me in Excel 2003 but after updating to Excel 2013, the macro gives me a "runtime error 1004 - unable to get the insert property of the picture class". When I debug, Excel crashes.

The macro is designed to loop through up to nine fields (in 9 adjacent columns) and find a photo path for a picture, insert the picture, and print that page, then go to the next column, get the photo path and insert that picture and repeat. The initial part of the macro is as follows. The PhotoID as Object seems to be what no longer works...

I do not care if the inserted photos are maintained in the file when it is not connected to the3 drive hosting the photos, only that I can print them when the drive is available.

Sub PrintPDFImpSums()[INDENT][INDENT]Dim PageNo
Dim RangePrint As Range
Dim Photo As Picture


View 1 Replies View Related

Excel 2010 :: Retrieve Photo From A Folder And Paste It Into Cell

Apr 20, 2014

Excel 2010, Windows 8.1. I want to retrieve a photo from a folder and paste it into a cell. I have the paste and format process figured out but I'm having trouble putting the file path together to retrieve the photo. If I use the full path, the statement below retrieves "IMAG1234.jpg" and puts it where I want it.


But if I have a different photo file name as a string in a cell (e.g. "IMAG5678.jpg") what is the syntax to attach it to the file path? i.e

ActSheet.Pictures.Insert("C:UsersEljafeDocuments1-QCReport_Photos") & "IMAG5678.jpg".Select '(which of course doesn't work)

So, I have a path but I want to attach different photo number to the path from a sting in a cell.

View 2 Replies View Related

Macro Adjustment

Feb 27, 2010

A board member helped me with a macro, but my example had the wrong columns, and I did not know how to adjust the macro.....

I have 3 columns.

Column 'W' Needs to return a value derived from 'fourth and fifth character' of Column K.

Column 'X' needs to return a value for the Sixth and 7th Character of Column K.

Column 'K' is a 7 Alphanumeric part #. example AI3-HDSS.

(first three alphanumeric characters change, but are not relevant.

The 11 combos are all the combos in the spreadsheet.

Col. Y
Col Z
Col AA
Col AB ...

View 9 Replies View Related

Month Adjustment Vba

Feb 6, 2007

code is pulling data for forecasts for the following 10 days, and the code is the following:


All he wants modified is to pull data for the entire current Month (Ex. if it is in the middle of July, he would want the data from July 1-July 31, or if February from Feb 1-Feb 28) It would be nice to do this without having to change the VBA every month.

View 4 Replies View Related

Data Search & Adjustment

Oct 1, 2008

I am trying to find a way to have a cell look into a group of other cells and display the first available things it comes to. Then have the next cell look in that same group and display the next item.

cells A1:A5 have 3 pieces of information in them scattered among that column (A1, A3, A5 might have the info in it one day, then A2, A3, A4 the next day)

I want B1:b4 to find the info in the A1:a5 and display it in order as it appears in the A column.

View 9 Replies View Related

Automatic Target Adjustment

Nov 3, 2008

I am building a sheet of sales targets for 2009. With each month allocated a certain percentage of the annual target.

I wish to be able to take into account a change of target at some point in the year.

If i were to change the annual target in June, i need the spreadsheet to only change the monthly targets from June onwards, January - May are finished.

In the example attached there is a change in annual target in June. How do i calculate what the remaining month's targets need to be in order to meet the annual target while taking into account what has already been achieved and the shape of the budget as indicated by the percentages??

View 5 Replies View Related

How To Indicate Which Month Adjustment Will Posted To Invoice

Feb 15, 2012

I'm trying to determine how to indicate which month an adjustment will post to an invoice.

Column A= billing cycle date
Column B= Market
Column C= Adjustment Approved Date
Column D= Adjustment Amount
Column E = Which invoice will credit post to:

So I'm trying to build a formula in Column E that will look at the cycle date in Column A compared to the Adjustment approved date in Column C and then kick out which invoice the adjustment will appear on. The values in Column E were placed mannually to show what I'm trying to accomplish. if the adjustment approved date is = to a cycle date it will show up on the same invoice. ie if approved on the 1st and the cycle date is the 1st the invoice will reflect the approved adjustment.

ABCDE1Cycle Day of MonthSales MarketAdjustment Approved DateAdjustment Amountposted invoice21Salt Lake12/15/2011-$1,300.00Jan '1232Denver12/22/2011-$3,802.01Jan '12411Atlanta1/12/2012-$5,292.00Jan '1255Dallas1/23/2012-$6,000.00Feb '12628New York2/1/2012-$5,000.00Feb '1272Denver12/5/2011-$500.00Jan '1283Seattle2/4/2012-$440.74Mar '12912San Diego1/4/2012-$500.00Jan '12101Phoenix1/17/2012-$257.87Feb '12112Denver1/18/2012-$1,220.92Feb '12123Seattle2/5/2012-$911.03Mar '12134Spokane1/30/2012-$20,391.86Feb '12145Dallas12/6/2011-$45.63Jan '12151Phoenix12/7/2011-$7,176.14Jan '12

View 2 Replies View Related

Adjustment To VB Code To Capture A Range

Aug 22, 2007

The code below puts a green border around the cell that is beneath 10 in my chosen range, however I wish to add the border to the row of information instead of just the cell. My columns of data are from columns E to M, but the criteria for whether or not the data gets a green border is in column lets say D15 is less than 10, I would want a border to go around E15:M15.

Sub Test()
For Each c In Range("D2:D350")
If c < 10 Then
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 4
End With

View 9 Replies View Related

Picture Width And Height Adjustment

Oct 28, 2008

I need to paste a picture from the Clipboard to my Worksheet. I select the origin and paste it with the macro.

I need to adjust that picture to fit in a defined space from left corner of Range($J$10) to the right corner of

Actually, i'm using this procedure

Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.Height = 358.25
Selection.ShapeRange.Width = 725.

The problem with it is, the Height and Width is arbitrary to the size of the cells at the moment. I would like to had a procedure to calculate does value. They represent the distance between the defined cells location for the image. Actually, if cells width or height change, the picture is misplaced.

View 9 Replies View Related

Adjustment To Remove FALSE Result

Feb 1, 2009

Im having alot of difficulty preventing the result FALSE when one or more of my >20 count within an index table doesnt have a result to display.

Is there anyone able to understand the following? That can perhaps provide a solution that returns no FALSE word??

=IF(ISERROR((VLOOKUP($A22,'C Number'!$A:$N,B$1,0)))=FALSE,VLOOKUP($A22,'C Number'!$A:$N,B$1,0))

Ive tried ISNA but I always get an error appear when i try to use it, perhaps you could edit the command above so that ISNA works whenever FALSE is the result?

View 9 Replies View Related

Copy From Userform To Database (code Adjustment)

May 19, 2014

when "Update"(code is under "Update"button) button is pressed to copy the data from userform to the database sheet exactly into columns where both column heading match, for example if userform has heading "Qty Received " all data from that column should be in the database column with the same header "Qty Received"

I attached my file when you will open the file you will find screenshot how it should look.

View 14 Replies View Related

Consecutive Sequence Find Formula Adjustment

Jul 18, 2007

Have this formula which works fine for finding the largest sequence in a list. (c/o Domenic from [url]


Now i need to:

(a) from the cells B5:CC5 that this formula runs through find the highest figure and return the name in Row 1 of that column.

(b) adjust above formula to get something now that ignores any run that contains 7 or more consecutive "n/a"s

(c) get a formula that counts the latest run. eg. from the bottom up (at the moment data only goes down to row 200)

View 9 Replies View Related

Code Adjustment To Copy And Paste Bold Text And Border?

Aug 13, 2014

Is it possible to modify the attached code so that it will copy bold text and border as shown in attachment sample1 and paste in sheet Shop. Currently the code just copy's and pastes without bold text and borders.


View 4 Replies View Related

Excel 2007 :: How To Copy A Cell Without Auto-adjustment Of Fix Cell References

Jun 15, 2014

Assume I have a cell M24 with a formula like

=M10 + $H24 - $I24*0.35

As you can see B10 is a fix reference (due to omitted $) which should NOT be auto-adjusted but be kept.

Now I want to copy the formular to lots of cells below cell M24. therefore I mark cell M24 and click copy in context menu.

Then I drag/expand the blinking cell border to lets say the 20 cells below. As I result I expect e.g. in cell M25 a formula like

=M10 + $H25 - $I25*0.35

Unfortunately I got

=M11 + $H25 - $I25*0.35

So the fix reference is adjusted as well.

How can I tell Excel 2007 to NOT auto-adjust fix references in formulas?

View 2 Replies View Related

Excel 2010 :: Cell Insert In One Column To Insert In Other Columns?

Mar 23, 2012

I have a master data sheet with four columns, A, B, C and D

Column A has the primary data and B,C,D has dependent data values;

So when I insert a new cell in Column A with cells Shift Down, I want mandatorily new cells to be inserted in the same row in col B, C and D as well so that data integrity is maintained;

View 2 Replies View Related

Insert Excel Formula Using VBA......MATCH Function Is What I Want To Insert

May 7, 2009

I can use the MATCH function when i am in excel but i am having trouble getting it to work when i am trying to insert the formula using VBA.

Here is the code i have but it wont even compile........

View 9 Replies View Related

Insert New Row In Vba

Jan 21, 2010

I have extracted a portion of a record from the original file attached herein What I have been trying to do is to manually insert a new line after the last record of each country_id. and I need to the routine for about 3500 line items with over 130 country id instance.

View 3 Replies View Related

Look-up And Insert Row

Jan 10, 2007

In column B, there is a list of companies. In column C there is the sales value for each company with sub totals after each type of company. For eg:

B3 - Header 1
B4 - Company name
B5 - Company name
B6 - Sub Total

B8 - Header 2
B9 - Company name
B10 - Company name
B11 - Sub Total

What I need to do is create a macro to look down column B for the cell containing "Sub Total" and insert a new row above. I will create a button to do this. So, if I want to add a new company under header 1 I will press button 1 and a row will be inserted above the header 1 sub total. The same will apply if I want to add a new company under header 2 and so on.

View 9 Replies View Related

Insert New Row Above A Row

Jun 22, 2007

How can I insert a row immediately above a row containing the term "Score" in column B that is say cell B9 contains the term "Score" then on running the macro it will insert a row at row 9 and will pull down the row containing "score" to row 10 and so on.

Can a macro to this be provided?

View 9 Replies View Related

How To Insert A Row Into Every Other Row

Feb 4, 2010

could someone tell me how to insert a row into every other row in excel without clicking every single row to insert?

View 9 Replies View Related

Copyrights 2005-15, All rights reserved