473,378 Members | 1,671 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,378 software developers and data experts.

Expression is not a Method.

Jeann9ne
Hello,

I'm experiencing the same problem over and over again and my professor is too busy with other students to help me in most of my labs.
(I'm not trying to get anyone to do my homework I just need one simple answer.)

Anyway, I tried to make a module:

Sub compareArea(ByVal rec1Area As Double, ByVal rec2Area As Double)

Blah Blah If-Then-Else Statement

End Sub

There are no errors until I try to call the module in Main then I get 'Expression is not a method.' I know it isn't a method, I just don't know how to make it into one, someone please help I've put 2 hours of research into this and still no answer.
Aug 2 '12 #1
5 5180
Guido Geurs
767 Expert 512MB
There are some conditions for working with array in functions.
The array's must have the same datatype,...
This is a good site with examples for working with array:

http://www.cpearson.com/excel/passin...ningarrays.htm
Aug 3 '12 #2
QVeen72
1,445 Expert 1GB
Hi,

Post the code here, what is there in module... and also the procedure calling in main program.

Regards
Veena
Aug 4 '12 #3
did you declare your sub in the module as public?

ie...
Public Sub compareArea()
Aug 6 '12 #4
Hi

When you state 'I tried to make a module', where have you tried to make the module is it a class module as attached to a form or is it a 'named module' in the visual basic editor ?

Where and how have you inserted your sub routine ?

Kind regards
Aug 6 '12 #5
Killer42
8,435 Expert 8TB
Your description is kind of vague. It would help if you could provide more specific details of the error. For instance...
  • Does the error occur when compiling or executing the code?
  • Where does compareArea() live - is it in the same module as Main?
  • Where precisely does the error occur? Is it the call from Main to compareArea which gets the error? Or does the error occur somewhere inside compareArea?
  • If you're in the VB IDE, what gets highlighted when the error is reported?
  • Perhaps you're qualifying the name of compareArea in the call? For example "Form1.compareArea".
Just keep in mind, in programming the details are crucial.
Aug 7 '12 #6

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

Similar topics

5
by: Mystilleef | last post by:
Hello, Is there a simple flag to set to allow overlapping matches for the findall() regular expression method? In other words, if a string contains five occurrences of the string pattern "cat",...
7
by: Billa | last post by:
Hi, I am replaceing a big string using different regular expressions (see some example at the end of the message). The problem is whenever I apply a "replace" it makes a new copy of string and I...
25
by: Mike | last post by:
I have a regular expression (^(.+)(?=\s*).*\1 ) that results in matches. I would like to get what the actual regular expression is. In other words, when I apply ^(.+)(?=\s*).*\1 to " HEART...
19
by: zzw8206262001 | last post by:
Hi,I find a way to make javescript more like c++ or pyhon There is the sample code: function Father(self) //every contructor may have "self" argument { self=self?self:this; ...
2
by: Amy L | last post by:
It looks as if there is no equivalent .Net regular expression method that is comparable to tr/// (Translate) in Perl. I was looking to squash a specific duplicate character in a string. In...
28
by: Marc Gravell | last post by:
In Linq, you can apparently get a meaningful body from and expression's .ToString(); random question - does anybody know if linq also includes a parser? It just seemed it might be a handy way to...
1
by: NvrBst | last post by:
I want to use the .replace() method with the regular expression /^ %VAR % =,($|&)/. The following DOESN'T replace the "^default.aspx=,($|&)" regular expression with "":...
7
by: PhilTheGap | last post by:
Hi, I've tried this: <asp:Button ID="Save" runat="server" Text="OK" OnClick="ServerSave" OnClientClick="SaveParam (<% Util.MaxTags %>)" /> but if fails... Util is a C# class, MaxTags a...
5
by: Andrus | last post by:
I added reference to Microsoft.VisualBasic.dll to project. Line var r = Microsoft.VisualBasic.CompilerServices.CompareString("a", "b", true)<1; causes compile error: The type or...
2
by: Colin Han | last post by:
Hi, all, If I write follow code in c# method. The IDE will compile it to a complex construct method of System.Linq.Expression. Expression<Func<int>ex = () =10; will be compile to:...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.