Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-27-2009, 08:59 AM
vsempoux vsempoux is offline Combobox manipulation Windows XP Combobox manipulation Office 2003
Novice
Combobox manipulation
 
Join Date: Oct 2009
Posts: 7
vsempoux is on a distinguished road
Default Combobox manipulation

Hello All,



I have created a word document with several comboboxes on the document (not in a form).

I would like to accomplish 2 things:
1) when i want to print the document i would like that the comboboxes don't show on the printout (they do now)

2) I would also like to add a custom toolbar with a button to hide/show the comboboxes (all of them, not individually).

Could anybody help me out with this.

Thanks already,
Vinnie
Reply With Quote
  #2  
Old 10-27-2009, 11:02 AM
Bird_FAT's Avatar
Bird_FAT Bird_FAT is offline Combobox manipulation Windows 7 Combobox manipulation Office 2007
Expert
 
Join Date: Apr 2009
Location: South East
Posts: 271
Bird_FAT is on a distinguished road
Default

Any chance you could post a copy of the document for us to have a look at?
(please remember to remove any sensitive or personal data)
Reply With Quote
  #3  
Old 10-27-2009, 11:49 AM
vsempoux vsempoux is offline Combobox manipulation Windows XP Combobox manipulation Office 2003
Novice
Combobox manipulation
 
Join Date: Oct 2009
Posts: 7
vsempoux is on a distinguished road
Default

Hello Bird,

Of course i can do that.
But I think that the document will generate errors due to the sql connection it will not find.

But you can find the document attached.

Any suggestions on how to improve my vba skills (after 1 week of digging in this totally new matter for me) are also very welcome.

Thanks already for the reply
Attached Files
File Type: doc Template 003.doc (60.5 KB, 22 views)
Reply With Quote
  #4  
Old 10-31-2009, 08:58 AM
Bird_FAT's Avatar
Bird_FAT Bird_FAT is offline Combobox manipulation Windows 7 Combobox manipulation Office 2007
Expert
 
Join Date: Apr 2009
Location: South East
Posts: 271
Bird_FAT is on a distinguished road
Default

Having looked at the document - I would suggest that you use Excel instead - By using Excel, you could create the Combo boxes that you wish, and also have them invisible to printing!
- Also the lookup functions could be a lot easier as well - if you import the data upon opening (to a hidden sheet), then you could use formulas in the drop down boxes to form the values, rather than have to work with such difficult coding.



If you insert the following code into the Module in the VBA Window, then you can have it resize the document window to the user's screen size upon opening.

Code:
Sub Auto_Open()
 
' Prevents the screen from updating until sequence is finished

    Application.ScreenUpdating = False
    
' Sets Sheet, Range and Cell selections:
' 'SHEETNAME = Name on sheet tab'
' 'RANGE = zoom selection' Set this to document width
' 'CELL = initial data entry cell' Set this to first data entry cell
    
    SheetAndRangeSelection SHEETNAME, "RANGE", "CELL"
    SheetAndRangeSelection wksChecklist, "A1:K4", "I7"
' Repeat the above line for each page that you wish to have resize.
    
    Application.ScreenUpdating = True
    
End Sub
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail merge Field Code Manipulation macjnr Mail Merge 0 09-10-2009 11:37 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:24 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft