oleobjects

  1. C

    Embedding the Excel File in a Word Report

    Hi, I am creating a report creation Macro to Export data to word but would also like to automatically embed the Excel file that the Macro is running from into the word template. Hi have been experimenting with this code but not sure if it is the correct way to do it. Getfile =...
  2. M

    Printout in a loop, keep getting same

    Hi,I have used below code to fill certain OLEObjects in a loop:Dim rng As RangeDim wsS As WorksheetDim wsD As WorksheetActiveSheet.Copy after:=Sheets(Sheets.Count)Sheets(Sheets.Count).Name = "Sourcebook"Set wsS = Sheets("Sourcebook")Set wsD = Sheets("CMR")Set rng = wsS.Range("A3"...
  3. P

    OLEObject Update LinkedCell witch VBA Code for a Check-Box

    Hi, I have this code which creates an ActiveX Check-Box with vba: With .OLEObjects.Add(ClassType:="Forms.CheckBox.1", Link:=False, DisplayAsIcon:=False, _ Left:=30, _ Top:=30, _ Width:=20, _ Height:=5) .Name =...
  4. J

    Close embedded Excel Object in VBA

    Hello, I'm going crazy trying to figure this out. I have, for security reasons, placed an embedded excel object (as an icon) in a very hidden sheet. Various code pulls up the object, extracts or adds data, and closes it with screen updates off. The code below works perfectly in Excel 2013, but...
  5. J

    Iterate Through OLEObjects For i

    I want to iterate through a range of combo boxes with similar names and add items to the combo box. For i = 1 To 5 Set varComoBox = ThisWorkbook.Worksheets("System").OLEObjects("cbo" & i) With varComoBox & i .AddItem ">" .AddItem ">=" .AddItem "<" .AddItem "<=" .AddItem "=" End With Next I...
  6. bs0d

    OLEObjects sub called when change in value?

    I have a checkbox with a _click() subroutine. I also have a command button to effectively reset my form. In this, I set the value of the checkbox to false (unchecked). When I do so, it executes the _click() subroutine. I tried changing _click() to _change() and it still does the same thing...
  7. W

    ListBox embedded in Frame of OLEobject on worksheet - where is the ListBox Click_Event?

    I have a worksheet to which I add an OLEobject as an MSForms Frame. I then add an MSForms listbox inside the frame contained in the OLEObject.Object property. I want to be able to trigger a click event when the user selects an item from the listbox inside the frame. I can trigger the...
  8. J

    Attach documents in Excel and then view them.

    I have an Excel workbook that allows users to attach documents. Once attached, I need an option to view/open these documents. I need to get the name of the open document so I can continue to control via the Excel workbook. Any ideas? Below is the full code for the View sub. I get "Run-time...
  9. M

    OLEObjects will not work with grouped controls?

    Hi Everybody. I am trying to set all checkboxes and radio buttons on a spreadsheet to False every time a drop down list value changes and I am using the following code: Dim ole As OLEObject For Each ole In ActiveSheet.OLEObjects If ole.progID = "Forms.CheckBox.1" Or ole.progID =...
  10. I

    Creating CheckBoxes with VBA results in random order

    I have some VBA (using Excel 2007) that deletes and re-creates a bunch (20-ish) checkboxes in a spreadsheet. Since i'm using the controls-based checkboxes, Excel defaults them to object names of "CheckBox1, CheckBox2, CheckBox3, etc" as I create them the first time around. Later on, i clear...
  11. D

    Add Optionbutton with VBA question

    Hello everyone, I am new to the Mr. Excel message boards. I found them after watching his Livelessons video training series. I've searched the boards, msdn, excel help, books, pdf's, etc and now I turn to the knowledge here on these boards for some help & guidance with the following situaiton...
  12. J

    Checkboxes disappear after macro is run

    Hi I have a macro that loops through a bunch of checkboxes to see if they are checked or not. If they are not checked the row it sits on plus the row below is hidden. Also the unchecked checkbox is also hidden. After this I call on print preview. Sub print_checked() Dim obj As OLEObject...
  13. E

    Delete OLEObjects in Break Mode

    Hi, I am writing some code that will create random data which will be used in a specific sheet to calculate certain values using the cell formulas. This sheet will be copied as many times as necessary to input the numbers generated (The code will generate a different set of numbers for a...

Some videos you may like

This Week's Hot Topics

Top