473,397 Members | 2,056 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Right turns to RIGHT and I get "Compile Error -Expected Array

I am trying to use the Right function in a VB6 program. I have used it used many times before in other programs.

When I press the enter key after entering the code line, the word "Right" turns into "RIGHT" in all capital letters

The line is
[code] LongText = RIGHT(LongText, 2)
I have used Option Explicit to make sure all variables are correct.

When I run the entire program I get an the following error message "Compile error Expected Array " and the word "RIGHT" is highlighted.

To make the problem more interesting, if I replace the word "RIGHT" with "LEFT" i receive no error message.

In addition I have this portion of the program in another program and it works!!!! I have compared programs and see no difference. I have checked the references in both programs and they are the same.

O/S WinXP with VB6
Mar 18 '07 #1
3 5407
willakawill
1,646 1GB
Just a quick glance and it looks like RIGHT is declared as an array somewhere in your code. What happens if you do a global search for the word 'right' in your code?
Mar 18 '07 #2
You nailed it. I had "RIGHT" as a constant.


Thanks ......
Mar 18 '07 #3
willakawill
1,646 1GB
You nailed it. I had "RIGHT" as a constant.


Thanks ......
You are very welcome
Mar 18 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Vio | last post by:
I would like to know if executing: c = compile('a=5\nprint a','<string>','exec') on a Linux box, then pickling+beaming the result on a Windows box, will give me the expecting result: >>>...
22
by: Qopit | last post by:
Hi there, I'm pretty new to Python and am trying to figure out how to get "will this code compile?"-like code checking. To me this is a pretty basic language/environment requirement, especially...
1
by: Steve | last post by:
I get this message when I tried to make a .MDE of my database. "Compile error in hidden module: Form_frmPurchaseReq" I have been using this database for several months and just thought I would...
3
by: Randy Yates | last post by:
How-to-do? -- % Randy Yates % "And all that I can do %% Fuquay-Varina, NC % is say I'm sorry, %%% 919-577-9882 % that's the way it goes..." %%%%...
10
by: Chris LaJoie | last post by:
Our company has been developing a program in C# for some time now, and we haven't had any problems with it, but just last night something cropped up that has me, and everyone else, stumped. I...
1
by: Edward King | last post by:
I have a statement in a asp,like follows£º var str=window.top.main.document.all.contenttext.value; I use IIS5.0 to deploy this asp,then I visit this asp like follows:...
2
by: yinglcs | last post by:
I have the following code, which use template as the parent class of my other class. But I have "instantiated from here" compile error at this line: class C: public B2<A>. Can some one...
21
by: comp.lang.tcl | last post by:
set php {<? print_r("Hello World"); ?>} puts $php; # PRINTS OUT <? print_r("Hello World"); ?> puts When I try this within TCL I get the following error:
6
by: JHNielson | last post by:
This is a very simple question.... I have a form that looks up Records for an unbound drop-down list. It has worked just fine up until last night. Now the button on the form to delete a record...
3
by: HOWARD MYERS | last post by:
mdb was originally developed on another machine and I had no trouble in making a MDE. It is now on a XP machine with Access 97 installed as well as Office 2003 installed (but not Access 2003). The...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.