Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Problem transferring Excel macros to another language

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default Problem transferring Excel macros to another language

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
ADODB Problem with transferring data from Excel to Access [email protected] Excel Programming 1 August 1st 08 09:32 PM
Transferring from sap to excel problem nugre Excel Programming 0 March 26th 07 12:33 PM
Macros created in another language pet Excel Discussion (Misc queries) 0 December 20th 06 05:58 PM
language support in excel sheet using a third party language tool seema Excel Worksheet Functions 0 March 13th 06 06:06 AM
Transferring Workbooks with Macros to and from Mac Excel Bill Excel Programming 0 February 16th 04 11:49 PM


All times are GMT +1. The time now is 01:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"