Thanks Thanks:  0
Likes Likes:  0
Results 1 to 6 of 6

Thread: Excel 97 Macro Question

  1. #1
    Board Regular
    Join Date
    Apr 2002
    Location
    Arkansas
    Posts
    157
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I'm trying to run the following (which works in Excel 2000 assuming I have an existing sheet called "Cost Sheet") but it won't in Excel 97. Can anyone tell me how to do it in 97?

    Sub BKHLCOST2()
    Dim CurrSheet As String
    Dim NewSheet As String
    Dim I As Integer

    CurrSheet = ActiveSheet.Name 'Gets name of current worksheet

    'Sheets.Add 'Not used right now
    Sheets("Cost Sheet").Select
    Sheets("Cost Sheet").Copy After:=Sheets(2)
    ActiveSheet.Name = Sheets(CurrSheet).Range("A8").Value
    NewSheet = ActiveSheet.Name
    ' DC
    Sheets(CurrSheet).Range("A8").Copy
    Sheets(NewSheet).Range("H3").PasteSpecial Paste:=xlValues
    'Vendor Name
    Sheets(CurrSheet).Range("D2:F2").Copy Destination:=Sheets(NewSheet).Range("C1:E1")

    End Sub

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    Sydney/Brisbane , Australia
    Posts
    542
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    where abouts is the code bugging?

  3. #3
    MrExcel MVP
    Colo's Avatar
    Join Date
    Mar 2002
    Location
    Kobe, Japan
    Posts
    1,456
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    2 Thread(s)

    Default

    Hi. What is your OS? Win2K?

  4. #4
    MrExcel MVP
    Colo's Avatar
    Join Date
    Mar 2002
    Location
    Kobe, Japan
    Posts
    1,456
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    2 Thread(s)

    Default

    Hello again, If your OS were Windows2000, Pls check the following site.
    Microsoft Knowledge Base
    PRB: Error Messages When Editing, Running, or Recording VBA Macros in Office 97 Application on Windows 2000 (Q264743)
    http://support.microsoft.com/default...;en-us;Q264743

  5. #5
    Board Regular
    Join Date
    Apr 2002
    Location
    Arkansas
    Posts
    157
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I'm running it on NT 4.0 Workstation (not by choice). So it's Office97 on NT 4.0.

  6. #6
    MrExcel MVP
    Colo's Avatar
    Join Date
    Mar 2002
    Location
    Kobe, Japan
    Posts
    1,456
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    2 Thread(s)

    Default

    Hi. Sorry, I don't know why...
    Maybe, someone helps you.
    Hope this helps + pen pineapple apple pen!

    Masaru Kaji aka Colo - cellmasters.net

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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