Results 1 to 29 of 29

Thread: Excel 97 (RESOLVED)

  1. #1

    Thread Starter
    Frenzied Member Robbo's Avatar
    Join Date
    Jan 2001
    Location
    Bradford
    Posts
    1,143

    Resolved Excel 97 (RESOLVED)

    Quick one, hopefully

    how do i customiser the Header?

    want &[Date] function but as Month year like FEB 05

    remember this is in the custom header bit not on the sheet , just todays date displayed as this, cheers
    Last edited by Robbo; Feb 3rd, 2005 at 09:37 AM.
    -----------------------------------------------
    "The hall is rented,"
    "the orchestra is engaged,"
    "its now time to see if you can dance!"
    Q, Q-Who, Star Trek The Next Generation
    -----------------------------------------------
    General Work day

    -----------------------------------------------
    DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Excel 97

    VB Code:
    1. Dim dd As String
    2. dd = Format(Date, "mmm yy")


    hope this helps pete

  3. #3
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818

    Re: Excel 97

    I think it takes the date format from your PCs regional settings for the Header/Footer.

  4. #4

    Thread Starter
    Frenzied Member Robbo's Avatar
    Join Date
    Jan 2001
    Location
    Bradford
    Posts
    1,143

    Re: Excel 97

    cant use VB, its in the Header footer part??, can i not use a format command or anything??

    can anyone help

    had a quick look, tried to change reginal settings however, it still does date month year, where i want month and year? as FEB 05, must be a way to do this??

    thanks for your help
    Last edited by Robbo; Feb 2nd, 2005 at 11:56 AM.
    -----------------------------------------------
    "The hall is rented,"
    "the orchestra is engaged,"
    "its now time to see if you can dance!"
    Q, Q-Who, Star Trek The Next Generation
    -----------------------------------------------
    General Work day

    -----------------------------------------------
    DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle

  5. #5

    Thread Starter
    Frenzied Member Robbo's Avatar
    Join Date
    Jan 2001
    Location
    Bradford
    Posts
    1,143

    Re: Excel 97

    hope this helps pete
    Whos Pete?
    -----------------------------------------------
    "The hall is rented,"
    "the orchestra is engaged,"
    "its now time to see if you can dance!"
    Q, Q-Who, Star Trek The Next Generation
    -----------------------------------------------
    General Work day

    -----------------------------------------------
    DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle

  6. #6
    Frenzied Member agmorgan's Avatar
    Join Date
    Dec 2000
    Location
    Lurking
    Posts
    1,383

    Re: Excel 97

    Quote Originally Posted by Robbo
    Whos Pete?
    Unless I missed the sarcasm and a joke....
    Very probably westconn1

    As in
    Hope this helps.
    Best Regards,

    Pete
    Rather than
    Pete, I hope this helps you.

  7. #7

    Thread Starter
    Frenzied Member Robbo's Avatar
    Join Date
    Jan 2001
    Location
    Bradford
    Posts
    1,143

    Re: Excel 97

    anyway back to my problem

    it still does date month year, where i want month and year? as FEB 05, must be a way to do this?? in the custom header??

    thanks for your help
    -----------------------------------------------
    "The hall is rented,"
    "the orchestra is engaged,"
    "its now time to see if you can dance!"
    Q, Q-Who, Star Trek The Next Generation
    -----------------------------------------------
    General Work day

    -----------------------------------------------
    DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle

  8. #8
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Excel 97

    I looked into it and didn't find anything. Maybe you could use another program to do the reports? Seems like a lot of work. I'd have thought that it was possible, but it doesn't seem like it.

  9. #9

    Thread Starter
    Frenzied Member Robbo's Avatar
    Join Date
    Jan 2001
    Location
    Bradford
    Posts
    1,143

    Re: Excel 97

    Quote Originally Posted by dglienna
    I looked into it and didn't find anything. Maybe you could use another program to do the reports? Seems like a lot of work. I'd have thought that it was possible, but it doesn't seem like it.
    Excel? its a spreadsheet that need printing out every month, with the date on the top

    if you cant help doesnt matter, is there anyone out there that has done this, im sure ive seen a spreadsheet with a bit of formatting before but cant find it

    cheers
    -----------------------------------------------
    "The hall is rented,"
    "the orchestra is engaged,"
    "its now time to see if you can dance!"
    Q, Q-Who, Star Trek The Next Generation
    -----------------------------------------------
    General Work day

    -----------------------------------------------
    DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle

  10. #10
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Excel 97

    Maybe you could record a macro that used SendKeys to type a date in the heading before it is printed?

  11. #11

    Thread Starter
    Frenzied Member Robbo's Avatar
    Join Date
    Jan 2001
    Location
    Bradford
    Posts
    1,143

    Re: Excel 97

    how do i do that?
    -----------------------------------------------
    "The hall is rented,"
    "the orchestra is engaged,"
    "its now time to see if you can dance!"
    Q, Q-Who, Star Trek The Next Generation
    -----------------------------------------------
    General Work day

    -----------------------------------------------
    DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle

  12. #12
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Excel 97

    record a macro of you manually typing in the code, and then edit the macro (which will be VBA code). where you are typing, substitute the sendkey commands.

    i think you'd be better off computing the formatted data into a cell, then setting it into a string, so that you could send the whole string at once.

    I'm pretty sure that you can tell sendkeys to send a string, but I've only seen it used to send quoted text. Yup. You can. I just looked at an example that sent the numbers 1-100 to calculator to add up.

    That should work well.

  13. #13

    Thread Starter
    Frenzied Member Robbo's Avatar
    Join Date
    Jan 2001
    Location
    Bradford
    Posts
    1,143

    Re: Excel 97

    Quote Originally Posted by dglienna
    record a macro of you manually typing in the code, and then edit the macro (which will be VBA code). where you are typing, substitute the sendkey commands.

    i think you'd be better off computing the formatted data into a cell, then setting it into a string, so that you could send the whole string at once.

    I'm pretty sure that you can tell sendkeys to send a string, but I've only seen it used to send quoted text. Yup. You can. I just looked at an example that sent the numbers 1-100 to calculator to add up.

    That should work well.
    havent a clue what your talking about, yeah know about macros but unsure what you mean about sendkeys?, want the date to appear in the customer header automatcally, if you can do that would u do on a template and zip up? so i have something to work with?
    -----------------------------------------------
    "The hall is rented,"
    "the orchestra is engaged,"
    "its now time to see if you can dance!"
    Q, Q-Who, Star Trek The Next Generation
    -----------------------------------------------
    General Work day

    -----------------------------------------------
    DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle

  14. #14
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Excel 97

    Phase I - Record Macro to type it in

    VB Code:
    1. Sub Macro1()
    2. '
    3. ' Macro1 Macro
    4. ' Macro recorded 2/3/2005 by David Glienna
    5. '
    6.  
    7. '
    8.     With ActiveSheet.PageSetup
    9.         .PrintTitleRows = ""
    10.         .PrintTitleColumns = ""
    11.     End With
    12.     ActiveSheet.PageSetup.PrintArea = ""
    13.     With ActiveSheet.PageSetup
    14.         .LeftHeader = ""
    15.         .CenterHeader = "Feb 05"
    16.         .RightHeader = ""
    17.         .LeftFooter = ""
    18.         .CenterFooter = ""
    19.         .RightFooter = ""
    20.         .LeftMargin = Application.InchesToPoints(0.75)
    21.         .RightMargin = Application.InchesToPoints(0.75)
    22.         .TopMargin = Application.InchesToPoints(1)
    23.         .BottomMargin = Application.InchesToPoints(1)
    24.         .HeaderMargin = Application.InchesToPoints(0.5)
    25.         .FooterMargin = Application.InchesToPoints(0.5)
    26.         .PrintHeadings = False
    27.         .PrintGridlines = False
    28.         .PrintComments = xlPrintNoComments
    29.         .PrintQuality = -3
    30.         .CenterHorizontally = False
    31.         .CenterVertically = False
    32.         .Orientation = xlPortrait
    33.         .Draft = False
    34.         .PaperSize = xlPaperLetter
    35.         .FirstPageNumber = xlAutomatic
    36.         .Order = xlDownThenOver
    37.         .BlackAndWhite = False
    38.         .Zoom = 100
    39.         .PrintErrors = xlPrintErrorsDisplayed
    40.     End With
    41. End Sub

    You may be able to change the .Center Heading right there, before you run the macro. Now I'm thinking that it can be done programmatically. If not, just use send keys to enter the information that I typed. That is not hard.

    You may have to use a VB program to alter the worksheet before you print it, but you could even print it from your VB program

  15. #15
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Excel 97

    I couldn't get it to run as a VBS script, but that's not my area of expertise.
    We have to do some work to get it to run from outside of Excel.

    One thing that I noticed is as soon as I typed it in the header advanced, then it became a drop down in the normal header selection form.
    Feb 05 was there right under Page # Date and the rest.
    If you could find *that* you could change it easier.

    I would post it in the VBA forum. RobDog888 prolly has a solution.

  16. #16

    Thread Starter
    Frenzied Member Robbo's Avatar
    Join Date
    Jan 2001
    Location
    Bradford
    Posts
    1,143

    Re: Excel 97

    ok we are getting somewhere now

    Sub Macro1()
    '
    ' Macro1 Macro
    ' Macro recorded 2/3/2005 by David Glienna

    With ActiveSheet.PageSetup
    .PrintTitleRows = ""
    .PrintTitleColumns = ""
    End With
    ActiveSheet.PageSetup.PrintArea = ""
    With ActiveSheet.PageSetup
    .RightHeader = "FEB 05"
    End With
    End Sub

    need this to display the month it currently is, so how do i do that?

    Sub Macro1()
    '
    ' Macro1 Macro
    ' Macro recorded 2/3/2005 by David Glienna
    Dim CurrentDate as String

    CurrentDate = Format(DATE, "MMM YY")

    With ActiveSheet.PageSetup
    .PrintTitleRows = ""
    .PrintTitleColumns = ""
    End With
    ActiveSheet.PageSetup.PrintArea = ""
    With ActiveSheet.PageSetup
    .RightHeader = CurrentDate
    End With
    End Sub

    how do i set up the font and size stuff, needs to be the same as the others which will be default in left and centre?

    thanks

    oh and how do i get to run when the sheet is opened, baring in mind that there are 4 other sheets in the workbook
    -----------------------------------------------
    "The hall is rented,"
    "the orchestra is engaged,"
    "its now time to see if you can dance!"
    Q, Q-Who, Star Trek The Next Generation
    -----------------------------------------------
    General Work day

    -----------------------------------------------
    DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle

  17. #17

    Thread Starter
    Frenzied Member Robbo's Avatar
    Join Date
    Jan 2001
    Location
    Bradford
    Posts
    1,143

    Re: Excel 97

    Quote Originally Posted by dglienna
    I couldn't get it to run as a VBS script, but that's not my area of expertise.
    We have to do some work to get it to run from outside of Excel.

    One thing that I noticed is as soon as I typed it in the header advanced, then it became a drop down in the normal header selection form.
    Feb 05 was there right under Page # Date and the rest.
    If you could find *that* you could change it easier.

    I would post it in the VBA forum. RobDog888 prolly has a solution.
    VB Code:
    1. Sub Macro1()
    2. '
    3. ' Macro1 Macro
    4. ' Macro recorded 2/3/2005 by David Glienna
    5. Dim CurrentDate as String
    6.  
    7. CurrentDate = Format(DATE, "MMM YY")
    8.  
    9. With ActiveSheet.PageSetup
    10. .PrintTitleRows = ""
    11. .PrintTitleColumns = ""
    12. End With
    13. ActiveSheet.PageSetup.PrintArea = ""
    14. With ActiveSheet.PageSetup
    15. .RightHeader = CurrentDate
    16. End With
    17. End Sub

    this is working but need to auto start?, also there are 4 sheets in the workbook?
    -----------------------------------------------
    "The hall is rented,"
    "the orchestra is engaged,"
    "its now time to see if you can dance!"
    Q, Q-Who, Star Trek The Next Generation
    -----------------------------------------------
    General Work day

    -----------------------------------------------
    DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle

  18. #18
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Excel 97

    Just name it Auto_Open and it will auto-start when the WorkBook is opened.

    My workbook had 3 sheets in it, so I don't think you have to do anything for 4 sheets.

    If it doesn't work for all sheets, just re-record it for all 4 sheets, and name that the Auto_Start macro that does it all!

    Hope that wraps things up. I guess we did it ourselves!
    Last edited by dglienna; Feb 3rd, 2005 at 08:47 AM.

  19. #19

    Thread Starter
    Frenzied Member Robbo's Avatar
    Join Date
    Jan 2001
    Location
    Bradford
    Posts
    1,143

    Re: Excel 97

    Quote Originally Posted by dglienna
    Just name it Auto_Open and it will auto-start when the WorkBook is opened.

    My workbook had 3 sheets in it, so I don't think you have to do anything for 4 sheets.

    If it doesn't work for all sheets, just re-record it for all 4 sheets, and name that the Auto_Start macro that does it all!

    Hope that wraps things up. I guess we did it ourselves!
    Auto_Open didnt work, still have to run macro, also it only does the header on the active sheet want on each of the 4 sheets with formating of the font, so not quite finished yet?
    -----------------------------------------------
    "The hall is rented,"
    "the orchestra is engaged,"
    "its now time to see if you can dance!"
    Q, Q-Who, Star Trek The Next Generation
    -----------------------------------------------
    General Work day

    -----------------------------------------------
    DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle

  20. #20
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Excel 97

    Can't find anything definitive in Excel. Now I saw Auto_Activate. Going to search on the web.

  21. #21
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Excel 97

    Ok. It seems that you have to call it from VBA. Here is a link.

    http://msdn.microsoft.com/library/de...HV03076909.asp

  22. #22

    Thread Starter
    Frenzied Member Robbo's Avatar
    Join Date
    Jan 2001
    Location
    Bradford
    Posts
    1,143

    Re: Excel 97

    ok

    VB Code:
    1. Sub Auto_Open()
    2. '
    3. ' Macro1 Macro
    4. ' Macro recorded 03.02.2005 by John.Robinson
    5. '
    6.  
    7. '
    8. Dim CurrentDate As String
    9.  
    10. CurrentDate = Format(Date, "MMM YY")
    11.  
    12. Sheets("D1 Survey").Select
    13.     With ActiveSheet.PageSetup
    14.         .PrintTitleRows = ""
    15.         .PrintTitleColumns = ""
    16.     End With
    17.     ActiveSheet.PageSetup.PrintArea = ""
    18.     With ActiveSheet.PageSetup
    19.         .RightHeader = CurrentDate
    20.     End With
    21.    
    22. Sheets("D2 Survey").Select
    23.     With ActiveSheet.PageSetup
    24.         .PrintTitleRows = ""
    25.         .PrintTitleColumns = ""
    26.     End With
    27.     ActiveSheet.PageSetup.PrintArea = ""
    28.     With ActiveSheet.PageSetup
    29.         .RightHeader = CurrentDate
    30.     End With
    31.  
    32. Sheets("D4 Survey").Select
    33.     With ActiveSheet.PageSetup
    34.         .PrintTitleRows = ""
    35.         .PrintTitleColumns = ""
    36.     End With
    37.     ActiveSheet.PageSetup.PrintArea = ""
    38.     With ActiveSheet.PageSetup
    39.         .RightHeader = CurrentDate
    40.     End With
    41.    
    42. Sheets("D5 Survey").Select
    43.     With ActiveSheet.PageSetup
    44.         .PrintTitleRows = ""
    45.         .PrintTitleColumns = ""
    46.     End With
    47.     ActiveSheet.PageSetup.PrintArea = ""
    48.     With ActiveSheet.PageSetup
    49.         .RightHeader = CurrentDate
    50.     End With
    51.    
    52. Sheets("D1 Survey").Select
    53. End Sub

    got this working for all the sheets, just need the font bit sorting out and the auto start and then we are done
    -----------------------------------------------
    "The hall is rented,"
    "the orchestra is engaged,"
    "its now time to see if you can dance!"
    Q, Q-Who, Star Trek The Next Generation
    -----------------------------------------------
    General Work day

    -----------------------------------------------
    DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle

  23. #23
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Excel 97

    VB Code:
    1. Workbooks.Open "ANALYSIS.XLS"
    2. ActiveWorkbook.RunAutoMacros xlAutoOpen

  24. #24

    Thread Starter
    Frenzied Member Robbo's Avatar
    Join Date
    Jan 2001
    Location
    Bradford
    Posts
    1,143

    Re: Excel 97

    ok

    got this now

    VB Code:
    1. Sub Auto_Open()
    2. '
    3. ' Macro1 Macro
    4. ' Macro recorded 03.02.2005 by John.Robinson
    5. '
    6.  
    7. '.RightHeader = "&""Arial,Bold""&14FEB 05"
    8. Dim CurrentDate As String
    9.  
    10. CurrentDate = Format(Date, "MMM YY")
    11.  
    12. Sheets("D1 Survey").Select
    13.     With ActiveSheet.PageSetup
    14.         .PrintTitleRows = ""
    15.         .PrintTitleColumns = ""
    16.     End With
    17.     ActiveSheet.PageSetup.PrintArea = ""
    18.     With ActiveSheet.PageSetup
    19.         .RightHeader = "&""Arial,Bold""&14" & CurrentDate
    20.     End With
    21.    
    22. Sheets("D2 Survey").Select
    23.     With ActiveSheet.PageSetup
    24.         .PrintTitleRows = ""
    25.         .PrintTitleColumns = ""
    26.     End With
    27.     ActiveSheet.PageSetup.PrintArea = ""
    28.     With ActiveSheet.PageSetup
    29.         .RightHeader = "&""Arial,Bold""&14" & CurrentDate
    30.     End With
    31.  
    32. Sheets("D4 Survey").Select
    33.     With ActiveSheet.PageSetup
    34.         .PrintTitleRows = ""
    35.         .PrintTitleColumns = ""
    36.     End With
    37.     ActiveSheet.PageSetup.PrintArea = ""
    38.     With ActiveSheet.PageSetup
    39.         .RightHeader = "&""Arial,Bold""&14" & CurrentDate
    40.     End With
    41.    
    42. Sheets("D5 Survey").Select
    43.     With ActiveSheet.PageSetup
    44.         .PrintTitleRows = ""
    45.         .PrintTitleColumns = ""
    46.     End With
    47.     ActiveSheet.PageSetup.PrintArea = ""
    48.     With ActiveSheet.PageSetup
    49.         .RightHeader = "&""Arial,Bold""&14" & CurrentDate
    50.     End With
    51.    
    52. Sheets("D1 Survey").Select
    53. End Sub

    its formatting how i want it, just need to run when workbook is opened?

    will have a try with

    VB Code:
    1. Workbooks.Open "ANALYSIS.XLS"
    2. ActiveWorkbook.RunAutoMacros xlAutoOpen

    as example
    -----------------------------------------------
    "The hall is rented,"
    "the orchestra is engaged,"
    "its now time to see if you can dance!"
    Q, Q-Who, Star Trek The Next Generation
    -----------------------------------------------
    General Work day

    -----------------------------------------------
    DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle

  25. #25
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Excel 97

    Hope it works...

  26. #26

    Thread Starter
    Frenzied Member Robbo's Avatar
    Join Date
    Jan 2001
    Location
    Bradford
    Posts
    1,143

    Re: Excel 97

    cant get any of that to run from open of spreadsheet

    VB Code:
    1. Workbooks.Open "ANALYSIS.XLS"
    2. ActiveWorkbook.RunAutoMacros xlAutoOpen

    is more to do with Workbook Object from VB6, need excel VBA
    Last edited by Robbo; Feb 3rd, 2005 at 09:29 AM.
    -----------------------------------------------
    "The hall is rented,"
    "the orchestra is engaged,"
    "its now time to see if you can dance!"
    Q, Q-Who, Star Trek The Next Generation
    -----------------------------------------------
    General Work day

    -----------------------------------------------
    DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle

  27. #27
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Excel 97

    I think I found something...

    http://support.microsoft.com/kb/157346/en-us

    If an Auto_Open, Auto_Close, or other automatically-running subroutine is stored "behind" a worksheet or ThisWorkbook, it may not function correctly when you open or close your workbook, or when you perform an action that should cause the subroutine to run.

  28. #28

    Thread Starter
    Frenzied Member Robbo's Avatar
    Join Date
    Jan 2001
    Location
    Bradford
    Posts
    1,143

    Re: Excel 97

    ive put it in a module and it works great, thanks alot, will put resolved in the header

    thanks again bye
    -----------------------------------------------
    "The hall is rented,"
    "the orchestra is engaged,"
    "its now time to see if you can dance!"
    Q, Q-Who, Star Trek The Next Generation
    -----------------------------------------------
    General Work day

    -----------------------------------------------
    DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle

  29. #29
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Excel 97 (RESOLVED)

    Great. Glad it works.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width