RichardMGreen

Hi all

I'm trying to convert a simple messaging program I created in Excel (using VBA) to VB so it can be used as a stand-alone program (i.e. without Excel being present).

The code is VBA is

Code Snippet
Shell ("net send ") & Range("B" & counter) & " " & message1, 0

where Range("B" & counter) is the name to send to and message1 is the message. The 0 at the end simply stops that annoying DOS shell tab appearing at the bottom of the screen.

I've tried to convert it to VB by substituting Range("B" & counter) for textbox1 and

message1 for textbox2 but can't seem to get it to work.

I feel I must warn you I am a complete novice at VB but do have some experience of VBA.

Anyone any ideas



Re: Visual Basic Express Edition Converting VBA to VB

js06

There are quite a few of us out here that want VBA in VB.net. It's here.

Do a search in the forum for Speadsheet Gear and also check out this link

http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1502922&SiteID=1

if you give me more info on what your program does i can help you furthur.






Re: Visual Basic Express Edition Converting VBA to VB

RichardMGreen

Thanks for that, but unfortunately, it's not quite what I need.

In Excel, I have some code that takes a Windows log-on name, a piece of text and, using the Net Send function from the Command window, sends the message to the person with that log-on name.

For example, in the Command window it would be:-

Code Snippet
net send joe.bloggs insert your message here

That would give a small pop-up window on joe bloggs' machine (providing he was logged in) saying "Insert your message here".

I'm trying to do the same thing in VB, so users without Excel can still have the same functionality without having to use the Command window.

On my form, I've currently got a textbox for entering the name(s) and a textbox for the message. What I need to do now is code the above Command window line into something usable by VB.

We're using Windows 2000 SP 4 if that makes any difference.





Re: Visual Basic Express Edition Converting VBA to VB

js06

Does Excel have anything to do with your messaging program or did you just use VBA because you could program with it.

Are your end users needing to use a spreadsheet in some way

Or are you trying to use excel to store the messages

In your new program in VB will you need to use a spreadsheet for anything

What i'm getting at is if you need to use a spreadsheet in some way and don't want your end users to worry about having excel then spreadsheet gear would be what you need or another embedded spreadsheet program. This one just happens to be free.






Re: Visual Basic Express Edition Converting VBA to VB

RichardMGreen

js06 wrote:

Does Excel have anything to do with your messaging program or did you just use VBA because you could program with it.

I used VBA as it was the only thing I knew at the time.

js06 wrote:
Are your end users needing to use a spreadsheet in some way
Not in the slightest, it was just a convenient way of doing it.

js06 wrote:
Or are you trying to use excel to store the messages
Again, no. see above.

js06 wrote:
In your new program in VB will you need to use a spreadsheet for anything
No

js06 wrote:
What i'm getting at is if you need to use a spreadsheet in some way and don't want your end users to worry about having excel then spreadsheet gear would be what you need or another embedded spreadsheet program. This one just happens to be free.

Don't need to worry about spreadsheets or anything esle. Like I said above, VBA was just quick and convenient.





Re: Visual Basic Express Edition Converting VBA to VB

js06

The only other help i can give you right now is to try the upgrade visual basic 6 code in the tools menu in VB express.

That may help you get your code converted.

I can help with other aspects but messaging is not something i have any experience with.

You might start another thread asking specifically about messaging and maybe post some code. Be really specific on what you want.

I hope this helps in some way.