Hi all,
This is a little Class which should allow for iterating over all running instances of excel, access and word in your computer. The GetAllApplicationsRefs Method gets you a COM reference to each and every instance of each application.
As we know, the vb GetObject function attaches to...
I use office 2016 Pro
I firstly did this by using
Private Sub ComboBox1_Change()
Dim MyWB As Workbook
Set MyWB = Workbooks.Open(ThisWorkbook.Path & ".\readings\" & Year(Date) & " - Table.xlsx")
If MyWB.Sheets(1).Cells(ComboBox1.Value + 1, 2).Value = 0 Then
TextBox1.Text =...
Hi, this an continuation of some code I posted in the past see Here ... This new addition uses file monikers to register objects in the Running Object Table and hence makes it possible to access UserForms from remote processes via the standard GetObject vba function.
The advantage of using...
Is it possible to have a recordset object created in one workbook but access this recordset object from another workbook's vba code? I was thinking maybe getobject could be used to capture it from another workbook but I cannot find any resources on this.
Hi, Everyone!
I'm simply tring to get a cell content from an unsaved workbook (Book1) through GetObject function, plus Copy and Paste. But as the content of the cell is a very long string, I only get a piece of it (until characters 255).
The code I'm using is:
Dim oApp As Application
Dim oWb...
The office has a case management system that will export the filtered data to Excel. By default, it will create a workbook called 'Book1' and place all data filtered to 'Sheet1".
Up until recently, I have used the code below on a Windows 7 machine using Excel 2010. We are starting the upgrade...
I execute this code (only part given here !):
Dim FSted As String, FDato As String, DSted As String, DDato As String
Dim xlApp As Excel.Application
Set xlApp = GetObject(, "Excel.Application")
AppActivate xlApp...
I have a stock function I use to test to see if Outlook is running before I attempt to draft an email. I've never had problems with it before, but today I ran the program and it doesn't acknowledge that Outlook is running. If I close/reopen the file, it seems to work and if I step through, it'll...
Hi all
If you call GetObject on a workbook opened in another excel instance ( workbook opened on the same pc or on a remote one) you get a pointer to that workbook ... This works fine . However, if the second workbook happens to be in edit mode or has a modal dialogbox on display (such as the...
I have created 2 macro's in excel that open a word .docm document and need to do 2 things:
1. do a mail merge (sub creëer contract)
2. delete bookmarks (call word macro's based on excel values)
Seperately they work as should, but I have difficulty putting them together.
I tried calling one...
Hi all,
Let's assume we want to get a pointer to a workbook opened in a second insatnce of excel and edit a cell .. we would normally use something like this :
Sub Test()
Dim wb As Workbook
Set wb = GetObject("C:\MyBook.xls")
wb.Worksheets(1).Range("a1").Value = 10
End Sub
The...
Hi all,
I am not experienced with network programming so I am asking here if the following prank would work (this is just an illustrative example)
Ok- Let's say a remote workbook (located in a network shared Drive/Folder) is currently opened by some user on the network and I wanted to play a...
Hello, I am trying to build a code that pulls data from an access database and fills charts in a powerpoint file with a template. This template has two charts initially built in 97-2003 format but i'm trying to update them to office 2013 charts.
I am running a macro that finds all the shapes...
Hi guys! I am a student and employee at my university and I am also fairly new to VBA. This is my first post on this forum and I would like to thank everyone in advance for the help.
I currently work for my IT department and we are launching a new phone system. I am working on an script that...
Hi,
I have a macro from attachmate that transfers data to an excel file. My problem is that i can't get these lines to work correctly (code that I use from Attachmate Extra!).
Set obj = Getobject("H:\ultimate.xls")
if obj is nothing then
set obj = CreateObject("Excel.Application")...
I am interested in pulling values from Excel into Word to automate reports. I have in the past used the GetObject function successfully and really liked the functionality. Recently our company upgraded to Office 2007 and when this happened I have not been able to get the same macros to work...
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.