![]() |
|
#1
|
|||
|
|||
![]() Quote:
I believe the code should be written on the frm under the cmdok; however, I'm not sure as I was unable to get it to run. I have backed out the additional code that I was tinkering with (since it was not working) and brought it back to basics. I have also removed the majority of the states to shorten the code for posting here. I'm really trying to figure out where to go from here and having a tough time. I've been researching VBA each day and on the weekends but clearly I have a long way to go. I apologize upfront for my lack of skill with this software. Here is what I have: modMain: Sub CallUF() Dim oFrm As frmSites Set oFrm = New frmSites oFrm.Show Unload oFrm Set oFrm = Nothing lbl_Exit: Exit Sub End Sub Sub PrintOut() With Dialogs(wdDialogFilePrint) .Background = True .Pages = "s1-s2, s4-s5" .Execute End With End Sub frmSites: Option Explicit Private Sub cmdCancel_Click() Me.Hide End Sub Private Sub cmdOK_Click() Me.Hide End Sub Private Sub UserForm_Click() End Sub Private Sub UserForm_Initialize() With ComboBox1 .AddItem "Atlanta, GA" .AddItem "Bethesda, MD" End With lbl_Exit: Exit Sub End Sub |
#2
|
||||
|
||||
![]() Quote:
See: https://support.office.com/en-us/art...7-E503BDF8375C
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Kea | Word | 3 | 05-30-2015 02:28 PM |
![]() |
Jshopping | Word VBA | 10 | 06-08-2012 01:15 AM |
![]() |
DKerne | Word VBA | 4 | 06-09-2011 11:54 AM |
Print Macro in MS Word | steve207 | Word VBA | 0 | 09-10-2010 02:11 AM |
Macro to export document sections to individual txt files? | MJMR999 | Excel Programming | 0 | 02-18-2010 12:49 PM |