Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 13th, 2007, 12:34 PM
Registered User
 
Join Date: Jun 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Getting username for last update on closed xl wb

I've written a VBA app to open, extract key data, and close some 1,900 excel workbooks that are updated throughout the day by several people. I write the data to a summary excel workbook. It's all working fine using VB 6.0(SP5) and Excel2003.

Now I'd like to add to the summary the date/time and the user for the last update in each of the workbooks . The date/time stamp is simple and under control. For the user stamp I'm sharing each workbook and tracking changes to extract the name from the track changes "History" worksheet. To create the History sheet I'm using:

With objXL.Workbooks
.HighlightChangesOptions When:=xlAllChanges, Who:="Everyone"
.ListChangesOnNewSheet = True
.HighlightChangesOnScreen = False
End With

I get the error that "xlAllChanges" is an undefined variable. If I remove the When:=... I get the error

Object doesn't support this property or method referring to the .HighlightChangesOptions When:=xlAllChanges, Who:="Everyone" line.

Any ideas where my problem might be? Could my VB 6.0 be too old for Excel 2003? Do I need to update VB somehow? Have I forgotten to load some component?

TIA for your insights.

 
Old June 13th, 2007, 02:14 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

The value of that constant is 2.

You would think that all enumerations would be available to VB from the inclusion of excel to the project, but apparently you are not afforded that luxury. But you should be able to overcome this shortcoming by either adding your own constant to your project (to keep the readability that constants and enumerations provide) and using that const, or just putting the hard-coded value of 2 as the argument value.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Help In using XL wunnavabk VB.NET 2002/2003 Basics 17 May 11th, 2007 08:29 AM
need of jar file(for XL operation) sam123 J2EE 0 February 7th, 2007 11:13 PM
Copying Xl sheet from one Xl file to another kesavan Excel VBA 1 July 3rd, 2006 10:11 PM
xl Cell Properties Neal Excel VBA 0 May 16th, 2006 06:19 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.