Welcome
Welcome to <strong>SpreadCE / Spread32</strong>.

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. Registration is fast, simple, and absolutely free, so please, <a href="/profile.php?mode=register">join our community today</a>!

Problem with Alert macro command

Post your comments, questions, bug reports and feature requests here.

Problem with Alert macro command

Postby MarkB on Tue Jun 30, 2009 5:14 am

This is my first try out of Spread32 and SpreadCE.
I'm developing the macros on the windows x86 version before moving it to WinCE.

on the win32 version

=ALERT(mysearch) gives me a macro error if "mysearch" contains alpha characters. Numeric only is ok.

code:

=SET.NAME("mysearch",INPUT("StockCode",1,"Input Stock Code"))
=ALERT(mysearch)
=RETURN()

I haven't tried it under wince yet.

What am I missing here ?
MarkB
 
Posts: 4
Joined: Tue Jun 30, 2009 4:19 am

Postby stephenbye on Tue Jun 30, 2009 8:46 pm

Hi Mark,

The Win32 and WinCE versions of the software are the same, so if something works on one then it will work on the other.

The second parameter of the INPUT function specifies the type of value it is expecting, according to this list:
0 formula
1 number
2 text
4 logical
8 reference
16 error
64 array
If your input value will be text then you need to use 2 instead of 1.

If your input value could be a number or text, then you could specify a value of 3 (which is 1+2) and the program should convert the input value to either a number or text as appropriate.
However, there is a problem with the program, and if you do specify a value of 3, it will always try to convert the input value to a number.
I am working on fixing this right now, but in the meantime if you change the 1 to a 2 in the Input formula then it should work correctly.
stephenbye
Site Admin
 
Posts: 150
Joined: Sun Aug 12, 2007 11:56 pm

Postby MarkB on Tue Jun 30, 2009 9:01 pm

Hi Stephen,

Unfortunately the input will be mixed text and numbers, with either one first.

No doubt this could produce interesting output.

I'll wait for the fix.

Many thanks,

Mark.
MarkB
 
Posts: 4
Joined: Tue Jun 30, 2009 4:19 am

Postby stephenbye on Tue Jun 30, 2009 9:15 pm

But if they arer stock codes, wouldn't you want the values to be always treated as text, even if they contain only digits?
stephenbye
Site Admin
 
Posts: 150
Joined: Sun Aug 12, 2007 11:56 pm

Postby MarkB on Tue Jun 30, 2009 9:32 pm

Yes, for this task the input would be treated as text regardless.

Using 2 solves the problem.

This is ancient stuff, I haven't used excel macros for many years, and I mainly used Lotus123 in those days.

Have you found any useful references on (old) macros ?
Most references to macros I found are actually VBA, which I am much more familiar with.

Thanks.
MarkB
 
Posts: 4
Joined: Tue Jun 30, 2009 4:19 am

Postby stephenbye on Tue Jun 30, 2009 9:45 pm

I don't know of any books on the Excel4 macro language, but you can download Microsoft's reference file for it from here:
http://support.microsoft.com/kb/143466
stephenbye
Site Admin
 
Posts: 150
Joined: Sun Aug 12, 2007 11:56 pm

Postby MarkB on Thu Jul 02, 2009 12:26 am

Thanks, that was useful, but lacks acurate examples.

After some hunting, I found a full Excel 4 here.
http://www.vetusware.com/category/Office/?cat=4&page=3
It has macro application examples and will be useful for initial developing on.
It even runs happily on XP.
MarkB
 
Posts: 4
Joined: Tue Jun 30, 2009 4:19 am


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron