-
Jan 22nd, 2008, 04:07 PM
#1
Thread Starter
New Member
Excel - Printing before Text Box Updates
I am having a problem with a print command executing before text box values are updated, per some code that I've written. The idea is the following:
1) I have a series of restaurant menu pictures dropped into Excel sheets. I have overlayed text boxes over the menu prices to allow me to change the prices that show up.
2) I am looking to systematically vary the prices that show up on those menus, working through a whole series of changes. The "price levels" that I am hoping to show are contained on a spreadsheet.
3) I am using a For i = 1 to blah loop to work through the level info.
4) At each pass through, it is supposed to grab info off of the price level sheet. Update some worksheet cells with the new prices by doing an HLOOKUP (in Excel). Then I update the text box values by referring to the updated worksheet cells.
Worksheets("Menu1").OBox4.Value = Worksheets("OB Prices").Range("E10").Value
I do this for a bunch of text boxes and then print the page.
When I do this, I am not getting any errors. However, the print command is executing before all of the text boxes are updated. So I'll print out the whole set, finding the same set of text box values on each printed page. Then after the printing is done, the boxes will all update on my screen.
Is there a way to ensure that the text boxes update BEFORE they get printed?
Thanks in advance for any help.
-
Jan 22nd, 2008, 07:39 PM
#2
Thread Starter
New Member
Re: Excel - Printing before Text Box Updates
Well, I'll be damned if I know why it works, but if I stick a bunch of "Page setup" commands in front of the print, it all works.
I wouldn't mind understanding what is going on but crisis averted for now.
-
Jan 22nd, 2008, 09:05 PM
#3
Frenzied Member
Re: Excel - Printing before Text Box Updates
Without seeing the code, is the printing code in the same sub as the textbox code?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|