Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I try to transfer an Excel application from an German version of Excel 2000
into an English version of Excel 2002. Except for some stupid problems with use of some functions where options or formats inside "quotes" have to be modified manually simple spreadsheets works OK. However when using macros I get error messages of following type: Run-time error '-2147319784 (80028018)' Method 'Select' of object '_Worksheet' failed (code used "Sheets("leave").Select") The second line varies according to the method used (e.g Method 'Activate' of object 'Windows' for code ''Windows(fno).Activate" or Method 'Goto' of object '_Application' for code "Application.Goto Reference:="R2C1" "). Note that when I set up a new spread sheet exactly the same code works as intended! What is the reason, and how can I make the application run without total rewriting (it is a quite complex application)? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
generally it is not necessary to Activate (or Select) worksheets or
cells/ranges in order to use them eg Worksheets("Sheet1").Activate Range"("A1").Select Selection.Value = "Hello World" is the same as Worksheets("Sheet1").Range"("A1").Value = "Hello World" if there's a lot of manupulation, use WITH / END WITH WITH Worksheets("Sheet1") WITH .Range"("A1") .Value = "Hello World" .Interior.Color = vbRed .Font.Bold = TRUE END WITH .Range("A2") = Now END WITH "svenstar" wrote: I try to transfer an Excel application from an German version of Excel 2000 into an English version of Excel 2002. Except for some stupid problems with use of some functions where options or formats inside "quotes" have to be modified manually simple spreadsheets works OK. However when using macros I get error messages of following type: Run-time error '-2147319784 (80028018)' Method 'Select' of object '_Worksheet' failed (code used "Sheets("leave").Select") The second line varies according to the method used (e.g Method 'Activate' of object 'Windows' for code ''Windows(fno).Activate" or Method 'Goto' of object '_Application' for code "Application.Goto Reference:="R2C1" "). Note that when I set up a new spread sheet exactly the same code works as intended! What is the reason, and how can I make the application run without total rewriting (it is a quite complex application)? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
ADODB Problem with transferring data from Excel to Access | Excel Programming | |||
Transferring from sap to excel problem | Excel Programming | |||
Macros created in another language | Excel Discussion (Misc queries) | |||
language support in excel sheet using a third party language tool | Excel Worksheet Functions | |||
Transferring Workbooks with Macros to and from Mac Excel | Excel Programming |