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

Compile error

Can anyone tell me why the following code line would give a "Compile error: wrong number of arguments or invalid property assignment"

TodaysDate = Date
ActiveCell.Select
ActiveCell.AddComment

ActiveCell.Comment.Visible = False
ActiveCell.Comment.Text Text:="(" & Format(TodaysDate, "m/d", 0, 0) & ") : Issue Opened"
ActiveCell.Comment.Shape.ScaleWidth 2.2, msoFalse, msoScaleFromTopLeft
ActiveCell.Comment.Shape.ScaleHeight 3.03, msoFalse, msoScaleFromTopLeft
Nov 20 '05 #1
5 2078

"Rog1" <an*******@discussions.microsoft.com> wrote in message
news:6F**********************************@microsof t.com...
Can anyone tell me why the following code line would give a "Compile error: wrong number of arguments or invalid property assignment"
TodaysDate = Date
ActiveCell.Select
ActiveCell.AddComment

ActiveCell.Comment.Visible = False
ActiveCell.Comment.Text Text:="(" & Format(TodaysDate, "m/d", 0, 0) & ") : Issue Opened"
'
1) we use paranthesis in .net when making function calls.
2) this looks like VBA.

ActiveCell.Comment.Shape.ScaleWidth 2.2, msoFalse, msoScaleFromTopLeft
ActiveCell.Comment.Shape.ScaleHeight 3.03, msoFalse, msoScaleFromTopLeft

Nov 20 '05 #2
* "=?Utf-8?B?Um9nMQ==?=" <an*******@discussions.microsoft.com> scripsit:
Can anyone tell me why the following code line would give a "Compile error: wrong number of arguments or invalid property assignment"

TodaysDate = Date
ActiveCell.Select
ActiveCell.AddComment

ActiveCell.Comment.Visible = False
ActiveCell.Comment.Text Text:="(" & Format(TodaysDate, "m/d", 0, 0) & ") : Issue Opened"
ActiveCell.Comment.Shape.ScaleWidth 2.2, msoFalse, msoScaleFromTopLeft
ActiveCell.Comment.Shape.ScaleHeight 3.03, msoFalse, msoScaleFromTopLeft


Doesn't seem to be VB.NET code. Why not post to the appropriate VB
Classic/VBA group?

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
It does look like (XL) VBA, and it looks like you are trying to double
assign a text parameter?
2) this looks like VBA.

ActiveCell.Comment.Text Text:="(" & Format(TodaysDate, "m/d", 0, 0) & ") : Issue Opened"


vs ActiveCell.Comment.Text ="(" & Format.....[etc]

assuming that was the line that threw the error....

For any additional issues or followup,
Microsoft.Public.Excel.Programming
might provide more targeted responses.

:-)
Nov 20 '05 #4
None the less... its definatly not .NET =)

"Keith R" <no****@nospam.com> wrote in message
news:%2******************@TK2MSFTNGP10.phx.gbl...
It does look like (XL) VBA, and it looks like you are trying to double
assign a text parameter?
2) this looks like VBA.
ActiveCell.Comment.Text Text:="(" & Format(TodaysDate, "m/d", 0,
0) & ") : Issue Opened"


vs ActiveCell.Comment.Text ="(" & Format.....[etc]

assuming that was the line that threw the error....

For any additional issues or followup,
Microsoft.Public.Excel.Programming
might provide more targeted responses.

:-)

Nov 20 '05 #5
Cor
Hi Rog,
Can anyone tell me why the following code line would give a "Compile error: wrong number of arguments or invalid property assignment" TodaysDate = Date
ActiveCell.Select
ActiveCell.AddComment

ActiveCell.Comment.Visible = False
ActiveCell.Comment.Text Text:="(" & Format(TodaysDate, "m/d", 0, 0) & ") : Issue Opened" ActiveCell.Comment.Shape.ScaleWidth 2.2, msoFalse, msoScaleFromTopLeft
ActiveCell.Comment.Shape.ScaleHeight 3.03, msoFalse,

msoScaleFromTopLeft

Some of this instructions needs arguments, that are one or more parameters
inside () or some of them needs a propery assignment, that is always one
behind a =.

They both have to be from the format and the ammount that is suspected.
There can only be one property.

I hope this helps?

Cor
Nov 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Danny Boelens | last post by:
Hi all, today I ran into a compile error after a compiler upgrade. I made a small example to demonstrate my compile error: template<typename T1, typename T2> class A {}; class B
5
by: Carmine Cairo | last post by:
Hi, I'm working on a project and today I've note a little problem during the compile fase. Here a little piece of code: // 1st version welldone = 0; size = p->getSize(); backbone = new...
5
by: Brice Prunier | last post by:
Here under 4 schemas i'm working with ( it may be long: sorry...) The context is the following : Resident.xsd imports Person.xsd and includes Common.xsd ( anonimous schema: no TargetNamespace )...
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...
6
by: Thomas Connolly | last post by:
I have 2 pages referencing the same codebehind file in my project. Originally the pages referenced separate code behind files. Once I changed the reference to the same file, everything worked...
0
by: Jim Heavey | last post by:
Internal Compiler Error: stage 'BEGIN' Hello, I had an application which was working just fine and I decided to modify all database access within the application to utilizie a new Namespace that I...
9
by: ThunderMusic | last post by:
Hi, I'd like to create a compile time error in my class... maybe there's a way already built in in the framework so I can achieve what I want... I have 2 constructors in my class. One of them...
4
by: tony | last post by:
Hello! My question is about calling this method CollectData below but I get a compile error that I shouldn't have because the type parameter is correct. The compile error is the following:...
5
by: wong_powah | last post by:
#include <vector> #include <iostream> using std::cout; using std::vector; enum {DATASIZE = 20}; typedef unsigned char data_t;
2
by: BruceWho | last post by:
I downloaded boost1.35.0 and built it with following command: bjam --toolset=msvc-7.1 --variant=release --threading=multi -- link=shared --with-system stage and it failed to compile, error...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.