Text(a1, "mmm") not in Basicmaker

Post Reply
enonod
Posts: 62
Joined: Tue Nov 08, 2016 1:54 pm

Text(a1, "mmm") not in Basicmaker

Post by enonod »

Text(a1, "mmm") in a cell correctly converts the date's month 11 to Nov.

EntryMonth = pm.activesheet.Text(pm.activesheet.Range("LastUpdate").Value, "mmm")
results in...

Object doesn't support this property or method

Have I done wrong or is it not supported?
martin-k
SoftMaker Team
SoftMaker Team
Posts: 3083
Joined: Fri Nov 21, 2003 4:57 pm
Location: Nürnberg, Germany
Contact:

Re: Text(a1, "mmm") not in Basicmaker

Post by martin-k »

You can't use PlanMaker calculation functions in BasicMaker scripts (you can use them in a cell and read the result from BasicMaker).

What you are looking for is the BasicMaker function "Format".
Martin Kotulla
SoftMaker Software GmbH
enonod
Posts: 62
Joined: Tue Nov 08, 2016 1:54 pm

Re: Text(a1, "mmm") not in Basicmaker

Post by enonod »

Thank you for your useful guidance martin-k.

I am actually surprised, in VBA (which I know is not Basicmaker) the following is the full item...

EntryMonth = WorksheetFunction.Text(pm.activesheet.Range("LastUpdate"), "mmm")

which I guess means you do not have the equivalent of "WorksheetFunction".
martin-k
SoftMaker Team
SoftMaker Team
Posts: 3083
Joined: Fri Nov 21, 2003 4:57 pm
Location: Nürnberg, Germany
Contact:

Re: Text(a1, "mmm") not in Basicmaker

Post by martin-k »

Yes, this is correct.
Martin Kotulla
SoftMaker Software GmbH
enonod
Posts: 62
Joined: Tue Nov 08, 2016 1:54 pm

Re: Text(a1, "mmm") not in Basicmaker

Post by enonod »

Whilst I have you, If I may be so bold, may I ask why the following does not work.
a1 is a date and date formatted.

pm.activesheet.Range(a1).Value = pm.activesheet.Range(a1).Value +1

to simply add one day.
martin-k
SoftMaker Team
SoftMaker Team
Posts: 3083
Joined: Fri Nov 21, 2003 4:57 pm
Location: Nürnberg, Germany
Contact:

Re: Text(a1, "mmm") not in Basicmaker

Post by martin-k »

You need to put "a1" in quotes. It is a string that represents a cell name.
Martin Kotulla
SoftMaker Software GmbH
enonod
Posts: 62
Joined: Tue Nov 08, 2016 1:54 pm

Re: Text(a1, "mmm") not in Basicmaker

Post by enonod »

I am sorry matin-k I was generalising by using a1 the actual is...

pm.activesheet.Range("LastUpdate").Value = pm.activesheet.Range("LastUpdate").Value + 1

where LastUpdate is A1 named.

edit: what happens is that it changes 26/11/2019 to 26/01/1900
Post Reply

Return to “BasicMaker 2018 for Windows”