Code Colors Like In VB Editor

Dreamweaver

Well-known member
Local time
Today, 13:10
Joined
Nov 28, 2005
Messages
2,466
I am just starting building a code library and one of the problems I wanted to get over first was the code colors as I would like to match what is in the editor

I have a replace tool but it's not up to the job but thought I would see If I could find a setting that worked but no luck there.

so before I get into looping through a string I was hoping somebody would know of a function out there that I could use to format the code

many thanks mick
2020-04-18 (1).png
 
Last edited:
That has just saved me a hell of a lot of work as I'm using rich text.

Thank you Crystal :love:
 
Hope It's not out of order for me to ask Crystal about the Keywords editor I'm using Righ text so HTML Would be perfect and to be honest I suspect what you have will be a lot better than what I could do.

keep safe mick :love: :love:
 
I would like to match what is in the editor

I must say, I haven't been able to find a converter that works specifically with VBA, although this site here does do a variety of conversions http://hilite.me/

I have found the best selection for displaying VBA using the "hilite.me" converter website is VB.Net and Style VS... It looks like this when when placed in an HTML web-page.

FormatedCode.JPG
 
hi Mick,

Thanks and you're welcome. My Code Documenter colors code when it generates the HTML report (or maybe I called it web report -- can't remember). I pulled out its coloring logic into an independent tool for myself, and enhanced it. Now though, I've prefer to build on the Color Comments Green database, to separate it even more -- it just keeps getting better ;) To do it right though, I need to spend at least a few days on it. However, until I get something better done, you could see how the Code Documenter does it (there is a table for keywords, which I've also changed since then), and my logic for finding comments is better than it was before!

Code Documenter
http://www.accessmvp.com/strive4peace/CodeDocumenter.htm
 
I was thinking of doing that as well as they would work better together I would send each line not starting with ' and run the key words on that line returning the formatted line back to add to the end of the string.

I've got plenty to keep me busy as I have a lot of support objects to build and I'm looking at @MajP tree view for the navigation should be sweet tool and think I'll make it a accde been 15 years since I built a addin but have yours as an example.

It will be an open code project and free for all

Mick
 
hi Mick,

It will be an open code project and free for all

wonderful!!!

make it a accde

One reason I don't like ACCDE's is that they protect the code so its NOT open. It is in the best interest of all of us who love Access, and want to keep it thriving as a product, to help other developers build more successful databases. That will do a lot to change the bad reputation that Access has gotten since now the marketing materials say you can build a quick and easy application in a few minutes so, essentially, with no real knowledge -- which just ain't true! Sadly, those bad databases with lots of problems, are often created by consultants who charge for them and then protect that bad design, which further enforces the bad press. Its also sad when some take what we freely share and commercialize it -- luckily they are few ... but some of them have deep pockets, bash our free tools, and manage to convince others that they shouldn't even try them. Despite that, I'll continue to be who I am.

I know there's a line one needs to draw ... and I fail to do that by giving so much away, which also keeps me mostly broke! ... but being successful, to me, isn't measured by a bank account. Its great when people donate, even just a little when they benefit from a tool. Every little bit says "thank you" and inspires. Then we can continue to freely share with all, as we inherently want to do!

15 years since I built a addin but have yours as an example

thanks. Building add-ins is a poorly documented topic! I stumbled myself, and want to save others from those same pitfalls stemming from a lack of documentation. Watch the video I linked to as well -- there is a list at the end of the things you should set. Not everything an Add-in reads is in the usysRegInfo table -- some are database properties.

I was thinking of doing that as well as they would work better together I would send each line not starting with ' and run the key words on that line returning the formatted line back to add to the end of the string.

That way to find a comment isn't good enough -- a comment could be at the end of a line (and words in the comment could be keywords!), or a single quote could be somewhere in a statement, inside double quotes. I think the trick, which I didn't do before but will do now, is to find the comment first. Then only mark keywords before that position.
 
Last edited:
I have developed a sql formatter which allows for in line and block comments, coloured keywords, layout etc. It's broadly based on visual studio functionality plus a few other things. It is still under development so I don't want to release a copy just yet. Don't see why it couldn't be applied to other languages
 
Sorry I ment accda lol

When I was saying they should work together the comment compiler should be first then another function will look for keep words 1 contanat would be the word If that I think when used always starts a line?. :)

I haven't really looked into it but as you already have a working version I don't intend reinventing the wheel

I have the same outlook as you and share a lot just look at all the examples, MS Templates I've rebuilt and small examples then there's my project manager project something I've been working on for 20 years although you have to reply to a agreement (Which is just a filter :sneaky: ) It's open code

The Project Manager Developer Project
Ms Templates
Employee's Example V4
Style Manager
Free Samples And Code snippets

While i'm on lockdown I'm taking the chance to build a few more saves me going nuts lol

Tobe honest I'm looking forward to this one as it's gving me a chance to learn a few new things like @MajP's treeview control and now your code

P.S. Just watched your video I would recommend it for all, Hope you don't mind me knicking that system table :D
 
Last edited:
hi Mick,

Sorry I ment accda lol

good!

While i'm on lockdown...

nice to do do something for others ~

P.S. Just watched your video I would recommend it for all, Hope you don't mind me knicking that system table

thanks! go right ahead, I want others to learn and develop their own tools -- and hopefully share them back too. Thanks for the Like and your nice comment too :)

The video is here for those that are curious what we're talking about:

How to Make and Install an Access Add-in (cc)
 
Another thought If I had a installer could I add the folder in the correct location where access would put it when installed as a addin? I think @isladogs may be able to answer that as I know he uses an installer ;)
 
hi Mick,

even if you put your accda in the 'correct' folder (which varies depending on your version), you'd still have to get Access to enable it. If you figure out how to do that without running Access as administrator, I'd love to know too!
 

Users who are viewing this thread

Back
Top Bottom