![]() |
#1
|
|||
|
|||
![]()
I want to scan a system for open Excel workbooks.
Sub GetExcelData() Dim WB As Workbook For Each WB In Application.Workbook If MsgBox("Do you want " & WB.Name, vbYesNo) = vbYes Then MsgBox ("Yes") End If Next WB End Sub The compiler complain and thinks that workbook is a user defined type. I do have the "Microsoft Office 16.0 Object Library" checked. What am I missing. Thanking you in advance (I have done Excel VBA for years but just starting Word) |
Tags |
excel to word |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Excel or Access | hollies | Excel | 17 | 07-18-2017 03:21 AM |
![]() |
John H. Power | Word | 3 | 08-03-2016 11:52 AM |
![]() |
jules43 | Word VBA | 1 | 03-23-2016 02:36 AM |
![]() |
docwilll | Office | 3 | 02-22-2014 03:40 PM |
Excel to Access to Excel for report automation | Nicholaspoe | Excel Programming | 10 | 10-08-2013 08:13 PM |