Thanks, Skip. You have replied to many of my posts in the past and I always appreciate your help.
I'm actually looking for something more generic, though. I'm not trying to change the font, but select a color. I want to use this for table background colors, textboxes, etc., so it needs to be...
I am using VBA in Word 2003. I want to display a dialog box to allow the user to select a color, like the one displayed when you choose More Colors from the Font Color drop-down button from the toolbar. I could not find one among Word's Built-in Dialog Boxes, and VBA's help files failed to live...
Good question, Gerry. A document created from a template is not automatically signed with the digital certificate, even if the template is. However, if a signed document is copied, the copy retains the signature.
Since I'm not about to distribute my digital certificate to my clients, I thought...
It needs to go in the click or change event handler for the list box so that it runs each time the user changes the selection.
[banghead] — Artificial intelligence is no match for natural stupidity.
The attachment of a template to the document is done programmatically based on which template the user chooses. So it will always be done on another computer than my own.
[banghead] — Artificial intelligence is no match for natural stupidity.
How involved is the VB code? VBA is very similar to VB, just with less bells and whistles (i.e. objects, functions, methods, and valid keywords). If the code you're trying to export is basic enough, it might just work straight out of the box.
[banghead] — Artificial intelligence is no match...
Something I like to do is disable controls altogether rather than show a MsgBox. For example, in the event handler for your list box, you could add the following code which enables the command button only if one or more entries are selected in the respective list box:
cmdMoveSingleEntry.Enabled...
I'm using VBA with Word 2003.
I have a project signed with a commercial digital certificate (from GlobalSign). The problem described below happens when I modify the document on a computer other than my own.
When I change the template attached to the document (either manually or...
My best solution would be to have the language preference stored in a field in some table, accessible by an option button on a form. Then create an Form_Open or Report_Open event handler for each form and/or report that needs to be translated.
In the open event, set the captions and/or...
Have you checked the value in cell Range("E" & I)? Perhaps there is a rogue value that is wiping out your string. I don't know; just thinking out loud.
[banghead]— Artificial intelligence is no match for natural stupidity.
OK, I've done some more work on this. It still isn't working, but I think I have identified the problem. Now I just need a solution.
Once again, what I'm trying to do is set the NumberFormat, NumberStyle, and StartAt properties of my ListTemplate. I'm using VBA in Word 2003.
I have tested and...
Mike,
When stepping through your code, at which line of your code does the string become truncated?
[banghead]— Artificial intelligence is no match for natural stupidity.
Actually, as Skip pointed out, selecting or activating are NOT necessary. In fact, that is what causes the screen flash. Selecting and activating greatly slow down the code. It is almost always preferable to assign the values directly, rather than selecting or activating.
Also, there is no...
Naz,
Unfortunately, there is no way to programmatically change the security setting in an MS Office app. Actually, I suppose that's fortunate, because doing so would allow any hacker to destroy your computer by disabling your security setting before allowing the malicious code to run.
However...
I like Skip's solutions. You can also avoid using the variable altogether (and make your code shorter) with the following single line of code:
Sheets("Sheet1").Cells(Row, Column) = Sheets("Sheet2").Cells(Row, Column)
Or, if you have the cells named,
[cellName1] = [cellName2]
[banghead]—...
I'm a bit confused, Peg. Perhaps we're referring to two different things when we talk of the Project Explorer.
The Project Explorer I refer to is a window within the VBA window. As I mentioned, it is traditionally on the left-hand side of the window, unless it has been moved. If it has been...
To add code to the Normal template:
1) Open VBA
2) Open the Project Explorer (Ctrl+R), if it is not open already. (By default, the Project Explorer is located on the left-hand side of the VBA environment, unless it's been moved.)
3) Select "Normal". If you wish, click on the + sign next to...
What application are you writing in? Is filesys an object variable? If so, what type?
[banghead]— Artificial intelligence is no match for natural stupidity.
I like PHV's solution.
TIA, the reason you were getting an error code is because the DateDiff function requires date values, while you were passing it strings (minDate and thisDate). Actually, since you did not explicitly dim minDate and thisDate, they were, by default, variants. But when you...
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.