Dim objX As OLEObject
Set objX = ActiveSheet.OLEObjects.Add(ClassType:="Word.Document.8", Link:=False, DisplayAsIcon:=False)
objX.Border.Color = RGB(255, 255, 255)
objX.Height = 200
objX.Width = 600
objX.Top = 300
objX.Left = 100
'-------make active
objX.Activate
Set objX = Nothing
i would like to place the object in a worksheet and have all the rows of data move down below the word object (i.e., below the word object--i do this resizing manually now...)...?
I have a sheet where I would like to have a picture inserted in a particular cell range and auto resized into that range. What I'm looking for is, if I type the name of a picture (meathead4uu.jpg) in a cell (Say, B3) then the picture should appear in range D14 to E28.
I need to insert rows in row A44 depending how many cells exits in a range i named "ALL_C"
I saw this code that inserts 10 rows on A44 so i thought by modifying it the way i did would work but it didn't. I'm still new at this stuff. What am i doing wrong?
Original
Sub Insertinrow43() Range("A44").Resize(10, 1).EntireRow.Insert End Sub Modified (doesn't work)
Sub Insertinrow43() Range("A44").Resize(Count(All_C), 1).EntireRow.Insert End Sub Thank you!
Since I cannot record the code when I create an shape (eg a rectangle), I am trying to write an small sub that would return the attributes of the object.
I select a red Rectangle I put on a tab.
I started as follow:
HTML Code:
Sub GetMeSelectedShapeAttributes() Dim Attributes(1 To 10, 1 To 2) As String With Selection Attributes(1, 1) = "name" Attributes(1, 2) = .Name Attributes(2, 1) = "Back color shapes" Attributes(2, 2) = .Fill.BackColor.RGB End With End Sub
My goal is to learn about the different attributes of shapes so I can manipulate them with code,
I am trying to figure out how to not allow a word to be type into a cell. I am relatively new to excel and I am working on a spreadsheet where I do not want the word TOMORROW to be allowed in a cell.
I need to read A1 Rows and if it's values is bold letters then i have to add from top of it's above un bold members like that the should work for 2000 rows Like below Ites income - (A) vlues need to be added from row 3 to row 9
I want to be able to create shortcuts for cells by using abbreviations. i.e If I wanted a cell to come up as "Food Services" all I would have to do is type in "FS" rather then the entire word or continually using copy/paste for the various abbreviations. Is this possible through excel or would it be best to be done through ms access?
I need to convert numbers to text in excel 2007. I have done it before in 2003, but can't seem to remember exactly what I used. I may have used some kind of conditional formatting, but not sure.
Here is an example of what I need.
If I type "7203" in a cell I want "Home Repairs" to appear. I have a list of words associated with a list of numbers and want to be able to type the number in a cell and have the word appear.
I have a file with over 20,000 rows that contain a date (Mon~Sun), What I need to do is remove every day that contains Mon~Sat and only keep Sun, this is the code that I have come up with and is working.
Code: Dim c As Range Dim SrchRng Set SrchRng = ActiveSheet.Range("A1", ActiveSheet.Range("A" & Lastrow).End(xlUp))3
I've added an word object to my excel sheet as an icon. The only problem is that it shows the word icon then under it says 'Microsoft Word Document'. This might be an obvious and silly question. But how do I Rename the 'Microsoft Word Document' to a title of my choice?
Is it possible to use VBA to call an existing Excel function? I want to have code that calls up the "Insert - Object" popup window in the same manner as it would if the user clicked the toolbar.
I want to use VBA to insert an Organisation Chart in Excel 2007 (ie if I did this manually it would be Insert, SmartArt, Hierarchy), but I cannot find anything on line that shows how to do this in Excel 2007. I know the code for Excel 2003, but that does not work in 2007.
The error I am getting (highlighted in red) is that it cannot view the object properties. So the picture is put in, but it's emplacement cannot be set and the picture cannot be renamed (which must occur for other macros to see it). Pages are not protected. The only self automated macro is on workbook open, and it only resizes to view the area depending on the persons resolution. Microsoft Excel 2003
I am trying to add a simple function to button in Excel.
First I need to select cell G24 as that where the inserted file should be placed on the worksheet. Then on the Add Object window to open but the tab 'Create from file selected.
Below is only part of the solution Sub ShowInsertObj() Application.Dialogs(xlDialogInsertObject).Show End Sub
Also is it possible to detect that file has been placed on the page ? In cell G24?
I am wanting users to attach a required zip file. I then need to check if they have done so.
I have Excel and Outlook 2010 64-bit. I'm trying to develop HTML e-mails that are a mix of text drawn from cells on one sheet and picture objects on another. I have no problem with the HTML body text, but I cannot figure out how to reference and place the Shape objects. I am using:
Code: ... .HTMLBody = "" & Range("F1").Offset(i) & Range("G1").Offset(i) & "" ... and I want to embed, between the text brought in with cells F and G, a picture object like
Code: Sheets("Images").Shapes("Picture 1")
I've found code that brings in a picture from a file but, for portability's sake, I really want to have the pictures maintained on the Images sheet and not in a separate file. However, I cannot figure out how to connect the HTML code with the spreadsheet object.
I have a workbook with about 8 sheets that is used for pricing vehicles with options.
On the first sheet is the list of about 40 vehicles. I would like to insert a command that IF the quantity of vehicle X = 1 (all others would be blank) then insert a MS Word document that contains the proposal.
The MS Word document could be a worksheet if necessary.
I attached a file with macro7 that prompts the user for text that will get rotated and inserted into the top left corner. The text is in the form "batch xxxx." I need a carriage return between the word "batch" and the numeric string. I guess the input box should have two lines instead of one.
the code does some other stuff which is why it takes a while to execute ....
I have a simple AVG formula and I would like to insert the word "minutes" after the result. I cant get it to work .... i know this is simple, but I am drawing a blank!
I was wondering if there was any way to do a cell format so that if I type in a word in sheet1 say "mike" on sheet2 the word "mike" cell would be highlighted? or if there is a formula you could use to do that.
I had copied a macro from this forum [it was posted by either shg or NBVC], and I modified it to fit my needs. The macro creates a new word document and sends a series of cells from an excel worksheet column to this word file. Everything works fine, but now I need to insert a picture after row 14. I have inserted the code [colored red], but I am sure the syntax or something isn't right. That part doesn't work.
I would like to be able to add vb code to my developing macro that searches within 1 column for the last instance of a particular word, then inserts a blank row under that word. All the data is sorted, so the words will be used multiple times, but I need the row to go under the last instance of each word in the column.