473,406 Members | 2,451 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,406 software developers and data experts.

Need Help to Convert this Mapbasic's Mapinfo code into VBA

I have this code that I gather from MabBasic (MapInfo) which will create thematic map. I need help to convert this code into VBA, so I can programatically create thematic map within MS Access/VBA.

Expand|Select|Wrap|Line Numbers
  1. Global sTable, sLegendTitle, sLegendSubtitle as String
  2. Global aColumn as Alias
  3. Global iNumberOfRanges as Integer
  4.  
  5.     sTable = "MapTable"
  6.     aColumn = "Population"
  7.     iNumberOfRanges = 8
  8.     sLegendTitle = "Population"
  9.     sLegendSubtitle = "Recent Data"
  10.  
  11.  
  12. Sub CreateThematic
  13.  
  14. OnError Goto ErrorHandler
  15.  
  16. Dim fRangeLimitsArray() As Float
  17. Dim bBrushStylesArray() As Brush
  18.  
  19. 'create ranges on selected column
  20.     Create Ranges From sTable With aColumn Use "Equal Count" Number iNumberOfRanges Round 1 Into Variable fRangeLimitsArray
  21.  
  22. 'create styles for the specified number of ranges
  23.     Create Styles From Brush (2,15597520,16777215) To Brush (2,32768,16777215) Vary Color By "RGB" Number iNumberOfRanges Into Variable bBrushStylesArray 
  24.  
  25.     'apply thematic
  26.     Shade Window FrontWindow() sTable With aColumn Ranges From Variable fRangeLimitsArray Style Variable bBrushStylesArray        
  27.  
  28.     'show legend
  29.     Open Window Legend
  30.  
  31.     'modify legend
  32.     Set Legend Window FrontWindow() Layer 1 Count On Title sLegendTitle Font ("Arial",1,9,255) Subtitle sLegendSubtitle Font ("Arial",2,8,255)
  33.  
  34.     'change legend window size
  35.     Set Window Legend
  36.         Width 3.54167 Units "in" Height 3.54167 Units "in"
  37.  
  38. Exit Sub
  39.  
  40. ErrorHandler:
  41.     Note Error$()
  42.  
  43. End Sub CreateThematic
  44.  
Sep 14 '12 #1
1 2644
MMcCarthy
14,534 Expert Mod 8TB
It is unlikely anyone here can help you unless they have mabbasic knowledge. You need to find someone who knows mabbasic who can translate this code for you so you know what it is doing exactly. Then our members can help we creating a similar function in VBA.
Sep 14 '12 #2

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

Similar topics

1
by: Søren Schimkat | last post by:
Hej Guys I´m stuck with af problem. I need to replace the HTML code in at table cell with some other HTML code. Could you please give me a hint on how to do that? Regards Søren Schimkat
7
by: Timothy Shih | last post by:
Hi, I am trying to figure out how to use unmanaged code using P/Invoke. I wrote a simple function which takes in 2 buffers (one a byte buffer, one a char buffer) and copies the contents of the byte...
5
by: Atara | last post by:
I am trying to convert the following code to VB .Net, I still have some gaps (the lines that are marked with (*)) and also I need an ending condition for the while loop. any help would be...
5
by: Vikas Kumar | last post by:
Hi, I'm not able to convert the following dll import statement in C# to VB.NET. Can any one please help me in this respect?
2
by: Zuhaib Hyder | last post by:
how do i can convert my aspx.vb code behind file into aspx.cs file? is there any automatic software available?
7
by: tararreb | last post by:
#include<stdio.h> /*This line is standard input output, # is directive, include is keyword, and stdio.h is header file*/ #include<stdlib.h> /*This line is standard input output, # is directive,...
6
by: priyanka1915 | last post by:
I want to convert the VB.net code in to VB 6.0 Please help me
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: 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...
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...

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.