![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Apr 2002
Location: Arkansas
Posts: 157
|
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 |
|
Board Regular
Join Date: Mar 2002
Location: Sydney/Brisbane , Australia
Posts: 539
|
where abouts is the code bugging?
|
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Mar 2002
Location: Kobe, Japan
Posts: 1,420
|
Hi. What is your OS? Win2K?
|
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Mar 2002
Location: Kobe, Japan
Posts: 1,420
|
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 |
|
Board Regular
Join Date: Apr 2002
Location: Arkansas
Posts: 157
|
I'm running it on NT 4.0 Workstation (not by choice). So it's Office97 on NT 4.0.
|
|
|
|
|
|
#6 |
|
MrExcel MVP
Join Date: Mar 2002
Location: Kobe, Japan
Posts: 1,420
|
Hi. Sorry, I don't know why...
Maybe, someone helps you. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|