MD,
I am using Word 97 (yeah, nothing like being current). Attached is a print-screen of the code with the error. Thanks!
Julie
MD,
I am using Word 97 (yeah, nothing like being current). Attached is a print-screen of the code with the error. Thanks!
Julie
Julie,
You need to click in the border to the left of the code "Sub Autoopen" to insert a breakpoint, then try to open the form. Pressing F8 will step you through each line until an error occurs. As I'm working in 2000, this may be the problem but not insurmountable.
MD
I got some new furniture tonight and had to pick up my son but I'm working on it - it will take a little bit.
I also think you may need to register your dlls with regserv32.exe. Add them as a reference to your VBA project - it may be comdlg32.dll or something like that... but will explain that once we get you up and running. Maybe someone else here will explain how to register dlls for you... that may be why you get an error message on userform1.show.
Joanne
What is the error you get?
I just took your latest posted example, double clicked on it in Winzip to create a document based on your template in Word 97 under Windows 95 and it worked fine (apart from the form being way too big for the 800*600 screen).
Enjoy,
Tony
---------------------------------------------------------------
Give a man a fish and he'll eat for a day.
Teach him how to fish and he'll sit in a boat and drink beer all day.
I'm (slowly) building my own site: www.WordArticles.com
Tony, MD and Joanne,
I opened the .zip file this morning and now it is opening fine. I don't know if there was something running in the background that made the computer think the form already was displayed? Who knows! I am still trying to figure out this letterhead/background issue...Thanks again!
Julie
I worked on the file for quite a while last night... maybe I'm missing something though so please bear with me.
TonyJollins said the form worked fine for him. But I see no command button so I am at a loss to explain how the form is populated once the user completes the UserForm.
Julie - can you explain - or is this what your original question was asking? I should have it done tonight if that was the problem but I'm afraid I'm looking a fool - because when I complete the information on the UserForm, I don't know what to do next....
Thanks.
Joanne
Sorry, Joanne. All I meant was it opened automatically so I couldn't see anything wrong with the .Show. I didn't try and do anything with it after it opened.
Enjoy,
Tony
---------------------------------------------------------------
Give a man a fish and he'll eat for a day.
Teach him how to fish and he'll sit in a boat and drink beer all day.
I'm (slowly) building my own site: www.WordArticles.com
Thanks Tony. I misunderstood.
Joanne
Joanne,
That's correct...I don't know what to do either. The sales rep can tab through the form over and over and...Anyway, I just need them to be able to print it to give to the customer. Which arises another question. There is no print option. Can I add one?
What I was asking about a few posts ago is when the file opens, the form opens over another document. I would like to be able just to open the macro form, nothing else. The way it is looks messy. Thanks for all your hard work! I REALLY appreciate it!! :0)
Julie
Julie: Do you realize you've got some of the best Word coders on the web helping you out? (Didn't know if you knew that---soooo cool!!)
I just wanted to let everyone know that the only thing I've ever heard of where we *hide the application* was this little jobbie from Colo, which hides the Excel interface and even allows the userform to show on the taskbar. Could someone modify it for Word? (I know--I make it sound easy and I'm sure it's not.)
http://puremis.net/excel/code/063.shtml
~Anne Troy
Will do Julie - but it's gonna take a bit of work I'll finish it as soon as I can.
Joanne
H Julie,
I assume you're looking to print out a document that looks like the Userform, is this correct? If not could you type up a document and post it, so that the printout can be arranged accordingly.
MD
Dreamboat:
I know I do and I am very grateful for it!! Thanks for the suggestion..
Joanne:
Thanks again for all your effort! I will look forward to seeing it...
MD:
Yes, something like a print screen would be great (unless there is an easier way to do it).
Thanks again all!!
Julie
Hi Julie,
I'm looking at somthing like this attachment. Obviously formatting etc. still to be done. Does it function 97? Click to new CommandButton to run.
MD
Hi Julie,
I took a copy of MD's version and merged a version of Colo's code (as posted by Dreamboat) to create the attached. Is this what you want to see?
Enjoy,
Tony
---------------------------------------------------------------
Give a man a fish and he'll eat for a day.
Teach him how to fish and he'll sit in a boat and drink beer all day.
I'm (slowly) building my own site: www.WordArticles.com
Hi Tony,
Thanks for that useful addition. One thing though, I can't get hold of the butterfly to delete/change it. Julie had a letterhead on her original posting, (which I had left off on my sample document) which presumably could act as the "image".
MD
Tony & MD,
I opened both .zip files and tried to run them. If I just select all the options that have a $$ amount then hit calculate, I get a "Compile Error: Variable not defined" in the "Private Sub CommandAddTotal_Click()" on line "tmp= 0". So, there is no way to get rid of the Word document that is open in the background of the form? When I hit the command button, it takes me to the "background" page. Is this what it is supposed to do? Thanks!!
Julie
My fault!
When I copied Colo's code, it came with an Option Explicit statement at the start and I left it there (the first line in the Form's code module), and didn't think to test the existing code with it.
Normally you should have this statement but you can delete it temporarily for this early stage of testing and one of us will make sure all the variables are declared later.
MD,
I just copied the butterfly as is from Colo's workbook. I'm sure a more relevant image can be found. If you go into Design Mode you can access it.
Enjoy,
Tony
---------------------------------------------------------------
Give a man a fish and he'll eat for a day.
Teach him how to fish and he'll sit in a boat and drink beer all day.
I'm (slowly) building my own site: www.WordArticles.com
Design mode!!!
Click on the set-square icon in the Control Toolbox
Enjoy,
Tony
---------------------------------------------------------------
Give a man a fish and he'll eat for a day.
Teach him how to fish and he'll sit in a boat and drink beer all day.
I'm (slowly) building my own site: www.WordArticles.com