Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default visual basic Mid() does not work with swedish version of excel

I am using the function Result = Mid(Mystring, Start, lenght) in Visual Basic.
It is working perfect with an english version of Excel.
The swedish version gives compile error "Cant find the project or library"
Visual Basic is not avialable in a swedish version .

Is it possible that this function can only be used in english speeking
countries?
Anyone else with this experience or a solution to the problem.

There is no problem if I use Mid as a spread sheet function.
Using Result = Application.WorksheetFunction.Mid(Mystring, Start, lenght)
in Visual Basic does not help.

Unhappy Swede
Jonas
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default visual basic Mid() does not work with swedish version of excel


mid is a standard vb function.

when VBA comes up with this type of problem it's due to a missing
reference (to ANY object library).

check tools/references in VBE. you'll find a referenced object library
listed as MISSING (or the swedish version of that word :)

uncheck or (re)install the missing library.


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


LindhJonas wrote :

I am using the function Result = Mid(Mystring, Start, lenght) in
Visual Basic. It is working perfect with an english version of Excel.
The swedish version gives compile error "Cant find the project or
library" Visual Basic is not avialable in a swedish version .

Is it possible that this function can only be used in english
speeking countries?
Anyone else with this experience or a solution to the problem.

There is no problem if I use Mid as a spread sheet function.
Using Result = Application.WorksheetFunction.Mid(Mystring, Start,
lenght) in Visual Basic does not help.

Unhappy Swede
Jonas

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default visual basic Mid() does not work with swedish version of excel

Jonas,
Usually when VBA error on such "normal" lines, it indicates that there is a
compile error somewhere else in your code, but the IDE picks that line, for
some unknown reason.
Comment out that line, then do a "Full Compile" and see what others error(s)
are flagged.

NickHK

"LindhJonas" wrote in message
...
I am using the function Result = Mid(Mystring, Start, lenght) in Visual

Basic.
It is working perfect with an english version of Excel.
The swedish version gives compile error "Cant find the project or

library"
Visual Basic is not avialable in a swedish version .

Is it possible that this function can only be used in english speeking
countries?
Anyone else with this experience or a solution to the problem.

There is no problem if I use Mid as a spread sheet function.
Using Result = Application.WorksheetFunction.Mid(Mystring, Start,

lenght)
in Visual Basic does not help.

Unhappy Swede
Jonas



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default visual basic Mid() does not work with swedish version of excel

In my experience, this is caused by a missing reference in VBE
Tools=References as stated by KeepItCool. Nick, I am only responding to
your post to emphasize KeepItCool's suggestion - this problem pops up
several times a week and invariably this is the cause.

A short stop cure is usually to qualify mid with vba.mid, but better to fix
the underlying cause.

--
Regards,
Tom Ogilvy

"NickHK" wrote in message
...
Jonas,
Usually when VBA error on such "normal" lines, it indicates that there is

a
compile error somewhere else in your code, but the IDE picks that line,

for
some unknown reason.
Comment out that line, then do a "Full Compile" and see what others

error(s)
are flagged.

NickHK

"LindhJonas" wrote in message
...
I am using the function Result = Mid(Mystring, Start, lenght) in Visual

Basic.
It is working perfect with an english version of Excel.
The swedish version gives compile error "Cant find the project or

library"
Visual Basic is not avialable in a swedish version .

Is it possible that this function can only be used in english speeking
countries?
Anyone else with this experience or a solution to the problem.

There is no problem if I use Mid as a spread sheet function.
Using Result = Application.WorksheetFunction.Mid(Mystring, Start,

lenght)
in Visual Basic does not help.

Unhappy Swede
Jonas





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default visual basic Mid() does not work with swedish version of excel

Hi Nick

Thank you for your prompt answer.
For many reasons it is more practical to work in an English version of
excel, as most literature as well as visual basic and common formulas are in
English.
My customer however is using Swedish Excel.

When I test my application on my "Swedish" computer nothing worked as
expected.
You are right I tested the Mid() function as a separate case and it worked.

In the English version I don't need to Dim constants but areas and if I need
to transfer values between procedures. I normally do this in a separate
Module and only once.

In the Swedish version every single expression has to be dimensioned and
also re-dimensioned in every single Module.

The Swedish version looks to be from Stone Age to me.
Do you have experience or good hints from bilingual problems, or if there
are parameters to be set to allow me to use my application on other computers.

Appreciate your kindness.

Best regards
Jonas

"NickHK" wrote:

Jonas,
Usually when VBA error on such "normal" lines, it indicates that there is a
compile error somewhere else in your code, but the IDE picks that line, for
some unknown reason.
Comment out that line, then do a "Full Compile" and see what others error(s)
are flagged.

NickHK

"LindhJonas" wrote in message
...
I am using the function Result = Mid(Mystring, Start, lenght) in Visual

Basic.
It is working perfect with an english version of Excel.
The swedish version gives compile error "Cant find the project or

library"
Visual Basic is not avialable in a swedish version .

Is it possible that this function can only be used in english speeking
countries?
Anyone else with this experience or a solution to the problem.

There is no problem if I use Mid as a spread sheet function.
Using Result = Application.WorksheetFunction.Mid(Mystring, Start,

lenght)
in Visual Basic does not help.

Unhappy Swede
Jonas






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default visual basic Mid() does not work with swedish version of excel

You don't need it to work in your original application?

--
Regards,
Tom Ogilvy


"LindhJonas" wrote in message
...
Hi Nick

Thank you for your prompt answer.
For many reasons it is more practical to work in an English version of
excel, as most literature as well as visual basic and common formulas are

in
English.
My customer however is using Swedish Excel.

When I test my application on my "Swedish" computer nothing worked as
expected.
You are right I tested the Mid() function as a separate case and it

worked.

In the English version I don't need to Dim constants but areas and if I

need
to transfer values between procedures. I normally do this in a separate
Module and only once.

In the Swedish version every single expression has to be dimensioned and
also re-dimensioned in every single Module.

The Swedish version looks to be from Stone Age to me.
Do you have experience or good hints from bilingual problems, or if there
are parameters to be set to allow me to use my application on other

computers.

Appreciate your kindness.

Best regards
Jonas

"NickHK" wrote:

Jonas,
Usually when VBA error on such "normal" lines, it indicates that there

is a
compile error somewhere else in your code, but the IDE picks that line,

for
some unknown reason.
Comment out that line, then do a "Full Compile" and see what others

error(s)
are flagged.

NickHK

"LindhJonas" wrote in message
...
I am using the function Result = Mid(Mystring, Start, lenght) in

Visual
Basic.
It is working perfect with an english version of Excel.
The swedish version gives compile error "Cant find the project or

library"
Visual Basic is not avialable in a swedish version .

Is it possible that this function can only be used in english speeking
countries?
Anyone else with this experience or a solution to the problem.

There is no problem if I use Mid as a spread sheet function.
Using Result = Application.WorksheetFunction.Mid(Mystring, Start,

lenght)
in Visual Basic does not help.

Unhappy Swede
Jonas






  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default visual basic Mid() does not work with swedish version of excel


I am just picking up on your comment: "In the Swedish version every
single expression has to be dimensioned and also re-dimensioned in
every single Module"

This might indicate that you have an OPTION EXPLICIT at the top of your
swedish module but you don't in the English module. The OPTION EXPLICIT
requires that every variable needs to be declared in a DIM statement.
Which is a little bit of extra work but saves thousands of problems.

Just a thought

regards


--
tony h
------------------------------------------------------------------------
tony h's Profile: http://www.excelforum.com/member.php...o&userid=21074
View this thread: http://www.excelforum.com/showthread...hreadid=508880

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default visual basic Mid() does not work with swedish version of excel

Try using

vba.mid(blah, n00b, etc.



"LindhJonas" wrote in message
...
I am using the function Result = Mid(Mystring, Start, lenght) in Visual
Basic.
It is working perfect with an english version of Excel.
The swedish version gives compile error "Cant find the project or
library"
Visual Basic is not avialable in a swedish version .

Is it possible that this function can only be used in english speeking
countries?
Anyone else with this experience or a solution to the problem.

There is no problem if I use Mid as a spread sheet function.
Using Result = Application.WorksheetFunction.Mid(Mystring, Start,
lenght)
in Visual Basic does not help.

Unhappy Swede
Jonas



  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default visual basic Mid() does not work with swedish version of excel

already suggested and ignored. However, this is a bandaid at best.

--
Regards,
Tom Ogilvy

"Chay" wrote in message
...
Try using

vba.mid(blah, n00b, etc.



"LindhJonas" wrote in message
...
I am using the function Result = Mid(Mystring, Start, lenght) in Visual
Basic.
It is working perfect with an english version of Excel.
The swedish version gives compile error "Cant find the project or
library"
Visual Basic is not avialable in a swedish version .

Is it possible that this function can only be used in english speeking
countries?
Anyone else with this experience or a solution to the problem.

There is no problem if I use Mid as a spread sheet function.
Using Result = Application.WorksheetFunction.Mid(Mystring, Start,
lenght)
in Visual Basic does not help.

Unhappy Swede
Jonas





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
How do I work with swedish excel 2003 that uses EDATUM DaveT Excel Worksheet Functions 1 November 1st 06 01:26 PM
Offline office help will not work in excel word or visual basic AlanHuddersfield Excel Discussion (Misc queries) 0 June 2nd 06 12:51 AM
Can I run Visual Basic procedure using Excel Visual Basic editor? john.jacobs71[_2_] Excel Programming 3 December 26th 05 02:22 PM
How do I convert my swedish version of office 2003 into an English Gin Excel Discussion (Misc queries) 1 October 9th 05 05:00 PM
Excel version identification from Visual Basic Raja Ranga Excel Discussion (Misc queries) 6 January 17th 05 08:48 PM


All times are GMT +1. The time now is 08:03 AM.

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

About Us

"It's about Microsoft Excel"