That fixed it! No error message! Thanks for all this.
I'm guessing that when the user clicks the button, the button retains focus and the property is rendered inaccessible. The selection.move action then moves it off focus? Whatever the explanation, thanks again.
And apologies for the...
First off, thank you for such a thoughtful response.
To address your questions/suggestions (based on your numbering):
1. FnSetForegroundWindow is a function to bring any window specified to the forground. In this case, I'm using it to bring forward the Word document window after having...
No, I've tried the ThisDocument vs. ActiveDocument approach. No luck.
It's very weird. I can see the property in the locals window, but its value is: TrackRevisions : <This command is not available.> : Boolean
Sorry 'bout that. The error occurs when I try to access and toggle the TrackRevisions property for the active document:
ActiveDocument.TrackRevisions = False
and
ActiveDocument.TrackRevisions = True
Posted this to the MS Office Application Errors forum, but got no reply. Any help here at Tek-Tips would be greatly appreciated.
Intermittent problem: My code (see below) results in a 4605 error message when called from a button click sub. The button click sub is run when a user clicks a...
Is there a way to copy code from one module to another using VBA code?
For example, in Excel I'd like to create a new worksheet, then copy some custom functions to the worksheet object from a specific module within the VBA project.
Thanks in advance.
I about around the bend on this one...
I have a three-column table in one Word doc. The second and third columns cells are set to non-wrap. In my VBA code I dynamically load information from a spreadsheet into the various cells. In this table, when the second column expands beyond its...
Thanks, John. I'll give your function a whirl. It's a lot cleaner than what I came up with on Google.
Also, apologies. I went back and looked for examples of blanks instead of zeros and realized there weren't any. I don't know what I was thinking.
The problem: vLookup successfully finds a value in another sheet, but when the return value is blank, the calling cell shows a zero.
I've done everything--cleared the blanks cells, applied the text format option--that seemed obvious to me, but no luck.
Some Google searches tell me that the...
I want to use Word VBA to select a range within an open spreadsheet. The simple code below points up the problem I'm having. Once the code hits the Range statement, I get a 1004 error. Everything else works fine. I believe my references are in order: Word VBA references XL5EN32.olb. Can...
Thanks! That was the code I needed. Very nice.
I agree with both of you that this is not an efficient way to work, but I'm trying to help someone who has developed a very idiosyncratic price book over a number of years. It's full of annotations, footnotes, etc. Unfortunately, to keep our...
I've been mulling this over for a day or two, and I'm just not experienced enough to get to an answer.
I have a Word file with a series of tables in it that present product prices. Column 1 is the product name, column 2 is product code and column 3 is price. In addition, I have an Excel file...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.