A Microsoft Word forum. Microsoft Office Word Forum - WordBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Microsoft Office Word Forum - WordBanter forum » Microsoft Word Newsgroups » Microsoft Word Help
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Accessing Excel from Word.



 
 
Thread Tools Display Modes
  #1  
Old August 4th 12, 06:17 PM
Sorcerer13 Sorcerer13 is offline
Junior Member
 
First recorded activity by WordBanter: Jun 2012
Location: Yorkshire
Posts: 0
Default Accessing Excel from Word.

I’m using Office 2010, using VBA to access an Excel Spreadsheet to pick up some values for my Word document’s Custom Control Listboxes. At the moment I’m trying to make the Word code “bombproof”, using “On Error Goto xxx”. I’ve had a look around to see if there’s a way to see if the error occurred after I’ve opened the Spreadsheet, but before I’ve closed it. Short of setting a User flag to say it’s open, I can’t see a way to interrogate the Excel Workbook Object to see if it’s open. Does anyone know a way?

Code snippets

Dim exWB As Excel.Workbook
Dim objExcel As New Excel.Application
.
.
Set exWb = objExcel.Workbooks.Open(strPathToTags)
.
.
exWb.Close (False)
Set exWb = Nothing
Ads
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem accessing Word rah5301 Microsoft Word Help 2 February 5th 10 03:48 AM
Problem accessing Word rah5301 Microsoft Word Help 0 February 5th 10 12:19 AM
Accessing Word Steve the Printer Microsoft Word Help 0 December 14th 07 03:38 AM
accessing trial for word 2007 A hansen Microsoft Word Help 3 October 24th 07 08:59 PM
Accessing network from Word luiss Microsoft Word Help 0 March 29th 05 11:39 AM


All times are GMT +1. The time now is 05:34 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright ©2004-2013 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.