If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Set Tools>>Options>>General within the Excel VBE by Code

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-22-04, 08:23
borisrisker borisrisker is offline
Registered User
 
Join Date: Jul 2003
Posts: 8
Set Tools>>Options>>General within the Excel VBE by Code

Hi Everybody !

Does anybody know if it is possible to set Tools>>Options>>General within the Excel VBE by Code ? (the equivalent of application.setOptions in Access)


Thanks !
Reply With Quote
  #2 (permalink)  
Old 05-22-04, 23:27
shades shades is offline
Registered User
 
Join Date: Oct 2003
Posts: 1,091
Howdy!

Easy way to check on something like this is to record a macro and go through the steps and options you want to set. Then check the VB Editor to determine how each was obtained.
__________________
old, slow, and confused
but at least I'm inconsistent!

Rich
(retired Excel 2003 user, 3/28/2008)

How to ask a question on forums
Reply With Quote
  #3 (permalink)  
Old 05-24-04, 14:29
borisrisker borisrisker is offline
Registered User
 
Join Date: Jul 2003
Posts: 8
Recording a Macro doesnt work

Hi !

thanks for the support, but this doesnt work. The macro recoder wont do it ...

regards,

boris
Reply With Quote
  #4 (permalink)  
Old 05-24-04, 15:10
shades shades is offline
Registered User
 
Join Date: Oct 2003
Posts: 1,091
Since I've not done any VB in Access, I'm not sure what application.setOptions does. Looking in the Help files for SetOptions in Access, it appears that some of the items can be done using other menu items in Excel.

What exactly are you trying to do? For instance, if you want to set the page margins, etc.
Code:
Sub PgSet()
    With ActiveSheet.PageSetup
        .PrintTitleRows = ""
        .PrintTitleColumns = ""
    End With
    ActiveSheet.PageSetup.PrintArea = ""
    With ActiveSheet.PageSetup
        .LeftHeader = ""
        .CenterHeader = ""
        .RightHeader = ""
        .LeftFooter = ""
        .CenterFooter = ""
        .RightFooter = ""
        .LeftMargin = Application.InchesToPoints(0.5)
        .RightMargin = Application.InchesToPoints(0.5)
        .TopMargin = Application.InchesToPoints(0.5)
        .BottomMargin = Application.InchesToPoints(0.5)
        .HeaderMargin = Application.InchesToPoints(0.5)
        .FooterMargin = Application.InchesToPoints(0.5)
        .PrintHeadings = False
        .PrintGridlines = False
        .PrintComments = xlPrintNoComments
        .PrintQuality = 600
        .CenterHorizontally = False
        .CenterVertically = False
        .Orientation = xlPortrait
        .Draft = False
        .PaperSize = xlPaperLetter
        .FirstPageNumber = xlAutomatic
        .Order = xlDownThenOver
        .BlackAndWhite = False
        .Zoom = 100
        .PrintErrors = xlPrintErrorsDisplayed
    End With
End Sub
__________________
old, slow, and confused
but at least I'm inconsistent!

Rich
(retired Excel 2003 user, 3/28/2008)

How to ask a question on forums

Last edited by shades; 05-24-04 at 15:25. Reason: Clarification
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On