Over 1 million tech questions and answers.

Solved: Visual Basic vs. Visual Basic for Applications

Q: Solved: Visual Basic vs. Visual Basic for Applications

Hello,

I guess my question can be asked in two ways, the short way and the long way.

Here's the short one:

Can you do everything that you can do with VBA with VB?
The long one is:

I need to be able to write programs that conceivably invovle web forms/web services (VB right?), Microsoft SQL Server 2002 (VB again right?) but also Microsft Office applications like Excel and Access (VBA??). Does that mean I need to learn both Visual Basic and Visual Basic for Applications? In my initial research into Visual Basic I've learned that Visual Basic for Applications is a subset of Visual Basic, so shouldn't that mean that Visual Basic, being the parent and more powerful than Visual Basic for Applications, is capable of performing all of the functions that Visual Basic for Applications does?

Thanks for your help,
Bsdslayer
([email protected])

RELEVANCY SCORE 200
Preferred Solution: Solved: Visual Basic vs. Visual Basic for Applications

I recommend downloading and running Reimage. It's a computer repair tool that has been proven to identify and fix many Windows problems with a high level of success.

I've used it in the past to identify and fix everything from blue screens (BSOD's), ActiveX errors, corrupt files and processes, dll/exe/sys errors, recover lost memory, Windows update problems, defragging, malware removal etc.

You can download it direct from this link http://downloadreimage.com/download.php. (This link will automatically start a download of Reimage that you can save to your computer.)

A: Solved: Visual Basic vs. Visual Basic for Applications

I do not know VB at all, only some VBA. The main difference is that VBA has words specifically for the applications, a classic exanple would be the
Range("a65536").End(xlUp)
both range and .End(xlUp) are for use in Excel.

Read other 3 answers
RELEVANCY SCORE 133.2

Hi All

Whenever I open Word, this error message pops up

'Microsoft Visual Basic for applications'

Why is this? please help. Thanks.

A:Microsoft Visual Basic for applications - What is this?

That suggests you have a faulty third-party addin installed.

Try starting Word in Safe mode (i.e. hold down the Ctrl key while starting Word). If you don't get the error message, a faulty third-party addin is indeed the most likely cause.

In that case, re-start Word and disable all non-Microsoft addins (see under Word Options>Addins). Re-start Word again. Hopefully no error messages. In that case re-enable an addin and re-start Word. Do this for each addin till you find the culprit, then uninstall or diable it (re-installing it might fix the problem if you need the addin).

Read other 1 answers
RELEVANCY SCORE 133.2

Does anyone happen to know of where I can go to learn Office 2010 VBA? I'm particularly interested in video tutorials right now, but I will look at everything.
 

A:Visual Basic for Applications Tutorials

Try these type of links
http://www.vbaexpress.com/portal.php
http://www.rondebruin.nl

The best tutorial is practice
 

Read other 1 answers
RELEVANCY SCORE 131.6

I've tried posting this on the WordPerfect forums, but can't get any help.

I'm trying to upgrade an entire office from WordPerfect 9 with Windows XP to WordPerfect X5 or X6 with Windows 7. The problem is none of the recent versions of WordPerfect Office come with Visual Basic for Applications (VBA). According to the manuals and help files I've read, you should be able to install VBA separately. Here's an excerpt from the WP-VB manual:If VBA 6.3 is installed on your computer, you can access the VBA Editor from within WordPerfect, Quattro Pro, and Presentations. VBA 6.3 is not included with WordPerfect Office X6. To use VBA macros, you must separately install VBA 6.3.
​VBA 6.3 isn't a standalone application. I have to install another software that bundles it. Okay, MS Office 2003 comes with VBA 6.3. I install it, and test it. The VB editor launches every time from within Excel. Checked the About Box, yep, it's version 6.3.

Back to WordPerfect, the issue persists. It can't use the VB editor. I go to Tools >> Visual Basic and all of the options are grayed out. Other people on the WordPerfect forums (namely WPUniverse and OfficeCommunity) have had similar issues, but it doesn't appear to be a top priority issue as it didn't appear in the forum frequently, and nobody had any real solutions other than to write in another language, like PerfectScript. We are unable to use PerfectScript because it lacks some of the functi... Read more

Read other answers
RELEVANCY SCORE 131.6

I have just started getting a degree in Computer Science and Engineering. I have learned C/C++ so far through the major. Next semester it is required that I take a course in GUI Programming using Visual Basic. I cannot get a straight answer out of my professor so I thought that I might ask here. Is Visual Basic used in real world applications? The way I understand it, Visual Basic is an interpreted language that can only be run on Windows based systems. So, why even bother using it if I can just use C or C++ to make a Windows GUI application?
 

A:Is Visual Basic used in real world applications?

Read other 16 answers
RELEVANCY SCORE 130

Hiya

This level 200 session focuses on deploying applications created with Visual Studio® .NET, contrasting deployment issues surrounding Visual Basic 6, COM objects, and the registry with the simpler Microsoft® .NET deployment

System Requirements
Supported Operating Systems: Windows 2000, Windows 2000 Service Pack 2, Windows NT, Windows XP

- Required disk space: 37 mb
- Windows Media Player 6.x or greater
- Internet Explorer 5.x or greater
- MSXML 4.0 SP1

http://www.microsoft.com/downloads/...33-80fa-4d82-a142-bd539134ae76&DisplayLang=en

Regards

eddie
 

Read other answers
RELEVANCY SCORE 130

Hiya

This level 200 session covers migrating existing ADO database access code to Microsoft® ADO.NET, working with existing Microsoft ActiveX® controls, and creating new ones for Windows Forms.

System Requirements
Supported Operating Systems: Windows 2000, Windows 2000 Service Pack 2, Windows NT, Windows XP

- Required disk space: 34 mb
- Windows Media Player 6.x or greater
- Internet Explorer 5.x or greater
- MSXML 4.0 SP1
http://www.microsoft.com/downloads/...9a-eb67-4aa6-b2e8-c8cd0fcd612e&DisplayLang=en

Regards

eddie
 

Read other answers
RELEVANCY SCORE 130

I wish to use VBA to automatically date selected cells.The dates are in ascending order and are separated by a fixed number of days.

For example :-
Date cells A1 , A10 , A20 , A30 with 1 Jan 2006 , 8 Jan 2006 , 15 Jan 2006 , 22 Jan 2006.

My experience in VBA is almost non-existent in this area and I would appreciate some help on this matter.

Any Suggestions please ?
 

A:Dating cells automaticaly using Visual Basic for Applications

Read other 16 answers
RELEVANCY SCORE 130

I developed a program in visual basic 6.0 and it works perfectly under Windows XP. When I try to run it on windows 7, some portions of it do not quite run as expected. All of the DLLs and other support files used by my application appear to be installed, but from what I?ve read this seems to be a common problem. Is there a workaround that might improve this?

Thanks.

A:What can I do to make visual basic 6 applications work under windows 7É

Visual Basic 6 came out in ~ 1998.

Upgrade your VB version - http://msdn.microsoft.com/en-us/vbasic/default

Regards. . .

jcgriff2

`

Read other 2 answers
RELEVANCY SCORE 130

Hiya

While Web applications have recently provided organizations with an easy solution to building broad-reach software, Windows applications remain vital to providing our customers with the richest possible user experience. In Episode 2, we take a look at building Windows-based applications in Visual Basic .NET and discuss enhancements to the Windows Forms designer, Windows application deployment, and creating Windows controls.

System Requirements

- Required disk space: 180 mb
- Windows Media Player 6.x or greater

Operating System - Windows 98, NT4 & 2000, Windows Me, Win XP

http://www.microsoft.com/downloads/release.asp?ReleaseID=44953&area=search&ordinal=21

Regards

eddie
 

Read other answers
RELEVANCY SCORE 128.8

Hiya

This presentation is part two of a comprehensive four-part series focused on moving existing Microsoft® Visual Basic® 6.0 applications to Visual Basic .NET.

This level 200 session covers migrating existing ADO database access code to Microsoft® ADO.NET, working with existing Microsoft ActiveX® controls, and creating new ones for Windows Forms.

System Requirements
Supported Operating Systems: Windows 2000, Windows NT, Windows XP

Required disk space: 47 MB
Windows Media Player 6.x or later
Internet Explorer 5.x or later
MSXML 4.0 SP2
http://www.microsoft.com/downloads/...9a-eb67-4aa6-b2e8-c8cd0fcd612e&DisplayLang=en

Regards

eddie
 

Read other answers
RELEVANCY SCORE 124.8

Hello everyone. Right now im doing a proyect in Visual FoxPro v. 6.5 where i am using a control names MAPX.OCX, this is used to display maps and its cordinates. I have already started to use this control, but im a bit stuck. I read in the manual of the control, but it is made for Visual Basic and C++ and I have very little experience using Visual FoxPro.

The instructions of the VB as the following:

Private sub Globessymbol_click()
Dim top20cities as mapxlib.layer
set top20cities = map1.layers("ciudades")
top20cities.style.symbolbitmapname = "x.bmp"
end sub

The Map1 is the name of an OLE object that identifies the MAPX.OCX and this also has some layers to put the name, icons, lines, etc. This layers are the ones i am having trouble codificating it in Visual FoxPro.

does someone here have any knowledge of how to do this? i'll thank very much the help.
 

Read other answers
RELEVANCY SCORE 122.4

Hi there
I'm just messing around a bit with Visual Basic - I just want to use EXCEL (mainly) and a couple of really simple Windows stuff. I can't be bothered with C# or .NET -- I'm not (nor intend to be) a professional programmer -- but would like to have a go with some small applications and get to grips with the Basic in EXCEL.

I've got the old Ms Visual Basic 6 disks -- is it worth while messing about with these on W8 (Ms believe it or not is going to support the platform through W8 releases !!!) or should I just bite the bullet and download Visual Studio express which seems a bit overkill also for what I'm really trying to do.

As I'm running a 32 bit version of Office it would seem that most of the VB6 stuff could run quite simply in EXCEL 2010 (32 bit) even though my OS is x-64 --or I could even run it in an XP VM.

Any suggestions as to which is the better way to go -- I just want this for casual use -- not as a professional.

Cheers
jimbo

A:Visual Basic 6 or Visual Studio for EXCEL use

Doesn't Office 2010 still support VBA (Visual Basic for Applications)? I think that is what you mean by Basic in Excel?

As far as supporting VB6 in Win 8, VB6 apps do run in Windows (32 bit), though we've had issues at work with some 3rd party components. I'm pretty sure 64 bit is out for VB6! I couldn't get any VB6 executables to run on my Windows 7-64 box, though they will run just fine in an XP VM.

I think your options are VBA in Excel if you want to stick with classic VB...

Read other 3 answers
RELEVANCY SCORE 118.4

ok so we are back to college and so we have some new subjects one of which is programming. so first day with a lecture today and the lecturer is a nightmare and she threw us straight into it we wer giving an assignment using visual basic where we have to create a program that we can input a code eg a course number and 3 pieces of information will come up on the same page in there own 3 separate labels. i have worked out the design thing but the code and language i havnt got a clue about. if anyone has a simular program or have had it as an assignment will they send me an example or just help it would be most appreciated. thankyou so much in advance for your help in advance!
 

A:Solved: visual basic 6 help.

Thats a really simple program to write, perhaps this tutorial which provides code samples will help you:

http://www.vb6.us/tutorials/subject
 

Read other 1 answers
RELEVANCY SCORE 118.4

Yikes!! I just discovered that my upgrade from Vista to Windows 7 does not swupport Visual Basic 6!

I still do a lot of work in VB. Also, I have two applications that front end Access databases in VB and although the they are free running exe apps, the odbc to link the data cannot be made to work.

Looks like I still need a computer running Win XP! Very frustrating. XP worked just fine. I should have been a plumber --- no change in over 20 years.
 

A:Solved: Visual Basic 6

Read other 10 answers
RELEVANCY SCORE 118.4

Hi what i am trying to acheive is when the user closes the form all of the contents of a listbox will be written on sepaerate lines of a text file without overwriting previous text in the file. I am using vb.

Thanks for any help
 

A:Solved: For Each Visual Basic

Read other 6 answers
RELEVANCY SCORE 118.4

Hello everyone,

I just have a couple of questions regarding VB if anyone can help answer, currently I'm studying IT and learning a bit of everything I have dabbled in many code languages c#, JavaScript, asp, PHP but more recently VB. I think I have taken too VB better than any of the other languages. But what I want to know is, is VB still well used in the industry i.e. are new application still being developed?

I posted a question a long time ago in the forum about different coding languages but I never really thought about VB, a lot of people recommended concentrating on PHP and C#, what are people’s recommendations today? Although I can do a bit of code work in each language I want to pick one and concentrate on that, so preferably a language which is going to be the most used to me now, until another language takes over in the future?

And finally, does anyone know of any well known programs, applications that have been made using VB that I can look at?

Thanks in advance for your advice
marques_uk
 

A:Solved: Visual Basic

Read other 9 answers
RELEVANCY SCORE 118.4

I am trying to recode a hangman game to allow a user to enter any length of word. As it sits now, the entire thing was coded to only allow 5 character words.

I understand how to get a word length, with string.length, and assign it to a variable - wordlength, in this case. But now I need to be able to assign my wordlabel.text a string of "-" where there are as many dashes as letters in the chosen word. That is where I am stuck... been reading through this string manipulation chapter and i can't exactly figure it out.

The first thing obviously is that I need to remove the limit on the word length, which is what I am attempting to do now. But then I need to get this program to properly search the string and replace the correct dashes with the correctly chosen letters.
This is the unmodified, functional code with a 5 character limit to chosen words.
Code:
Option Explicit On
Option Strict On
Option Infer Off

Public Class MainForm

Private Sub exitButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles exitButton.Click
Me.Close()
End Sub

Private Sub playButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles playButton.Click
'simulates the hangman game

Dim word As String = String.Empty
Dim letter As String = String.Empty
Dim iswordvalid As Boolean
Dim isdashreplaced As Boolean
Dim isgameover As Boolean
Dim incorrectcounter As Integer

... Read more

A:Solved: Visual Basic.

I'm no Visual Basic programmer but I do similiar things with vbs scripts and vba

You could display a variable:

wordLabel.Text = "-----"

Add a variable like

Dim maxwordlength as integer

maxwordlength = 10

wordlabel.txt = (string(maxwordlength,"-")

Don't forget, you can add an input box for the suer to add his desired wordength.
You will have to lilmit it to a ceratin number of letters

this will display as many dashes as the maxwordlength value.

I hope it helps you
 

Read other 1 answers
RELEVANCY SCORE 118

Hi everyone,

I've been trying to get my feet wet in creating a .vbs file from notepad to do a basic function. I wanted to be able to run .reg files remotely but also interactively. This led me down the path of simply finding an example of a .vbs that would open anything remotely at all. Notepad is what came up with the most results and the Win32_ScheduledJob object appeared to be what was needed.

I researched many different places but this is a decent walkthrough. http://msdn.microsoft.com/en-us/library/windows/desktop/aa394601(v=vs.85).aspx

I grabbed the code below out of the website and changed the date parameters to run in a couple minutes from my current time. I could see the task in scheduled tasks but when the time had come and gone nothing would happen and this is just trying to get it to run locally so far.

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
JobID = "Test"
Set objNewJob = objWMIService.Get("Win32_ScheduledJob")
errJobCreate = objNewJob.Create _
("Notepad.exe", "********143000.000000-420", _
True , 1 OR 4 OR 16, ,True, JobId)
If errJobCreate = 0 Then
WScript.Echo "Job created successfully: " & VBNewLine _
& "Notepad.exe scheduled to run repeately at 14.30 (2:30 P.M.) PST" & VBNewLine _
& "on Mon, Wed, and Fri."
Else
WScript.... Read more

Read other answers
RELEVANCY SCORE 117.2

Hello there, i have an activexdll(dllRep) with:
form = frmRep

and another separate proyect .exe with:
form = mainForm
button = button1

and have the dllRep reference
===========================
My Quest is: How can i open the form(frmRep) when click button1?
thank.
 

A:Solved: Visual Basic 6 and an Activex Dll

I dont know how i did it , but thanks anyway:
Code:
Private Sub Command1_Click()
Dim obj As Object
Set obj = CreateObject("dllProbando.dllclass")
obj.showform
End Sub

 

Read other 2 answers
RELEVANCY SCORE 117.2

Hi

I am new to Visual Basic and am currently writing a Macro to help me, the problem I have encountered is as follows:

I have a summary sheet that pulls data from five seperate workbooks and then manipulates it (I have managed to write this code)

My problem at the moment is that I get a new set of these 5 workbooks each month and I would like to be able to use my Macro to summarize the information each month. i.e. I would like to save these files (whose names do not change) to directories April2010, May2010 ... and draw information from the excel workbooks that I save inside the directory for that respective month.

I do not know how to make my Macro read the value in say cell A3, which will have the directory name (i.e.April2010, May2010 ... ) and then add it to my variable string that I use to access the folder through Visual Basic

Please help me if you can, I would sincerely appreciate it.

Thanks in advance
 

A:Solved: Visual Basic Help needed, please

Read other 7 answers
RELEVANCY SCORE 117.2

Hi ppl. Can anyone help me?

I have installed VB 6.0 on my laptop and am having a couple of issues.

Firstly when I open VB, all my recent projects disappear so I have to navigate around the server evertime I want to open a project (.vbp file).

Secondly whenever I close VB, I get an error message - see attached.

I have tried the following:

Uninstalled and reinstalled
Downloaded updates from the web

Any help would be much appreciated.

Thanks

jayjay1306
 

Read other answers
RELEVANCY SCORE 117.2

can teach me the use of visual basic and some of the problems that might happen? anybody.
 

A:Solved: Who can teach Me Visual Basic?

http://visualbasic.about.com/
 

Read other 2 answers
RELEVANCY SCORE 117.2

I am making a program that will use the parallel port. When I try to run a program that uses inpout32.dll visual basic crashes. Even if I compile it, the program still crashes. I have also tried some other dll's but they don't work either. If anyone has some info on this please post.

Thanks,
 

A:Solved: Visual Basic and inpout32.dll

I found the problem, i had an old version that would not work on windows xp
 

Read other 1 answers
RELEVANCY SCORE 117.2

how can i get the red to show up,

Code:

If FBD2.ShowDialog = Windows.Forms.DialogResult.OK Then
TextBox2.Text = "[color="red"]"[/color]" & FBD2.SelectedPath & "[color="red"]"[/color]"
End If

its just doing the { & FBD2.SelectedPath & } part.
 

A:Solved: Visual basic - text box

you could use CHR$(34) to produce the quote char - in your case perhaps just Chr(34)
 

Read other 2 answers
RELEVANCY SCORE 117.2

Hi, I program in VB6, which seems to have been completely overshadowed by VB.NET - I do not have the time to learn the .NET architecture and just want to create some simple applications.

Is there any way to obtain a copy of VB6 or some sort of add on to Visual Studio 2005? The upgrade code option is sloppy and does a really poor job converting programs I know worked fine in VB6. I cant work with this new fangled contraption.

How can I get my hands on a copy of VB6? Any thoughts at all would be appreciated.
 

A:Solved: Visual Basic 6 completely gone?

Read other 8 answers
RELEVANCY SCORE 117.2

Hey there i have a vb6 program that connect to a sql server db and then add the data to a grid so i can view, addNew and edit.

My Question is: is better to do this directly between sql server and vb6 or use xml(MSXML, SQL XML Query) between them?

Thanks.) 3.0
 

A:Solved: SQL Server '05 and Visual Basic 6

Read other 6 answers
RELEVANCY SCORE 117.2

My Timer is not waiting full interval to complete event

code that set the interval and starts the timer [NOTE] Timer1

Code:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

If CheckBox1.Checked = False Then
WebBrowser1.Refresh()
ElseIf CheckBox1.Checked = True Then

Dim hour = TextBox1.Text * 3600
Dim min = TextBox2.Text * 600
Dim sec = TextBox3.Text * 100
If hour + min + sec > 1 = True Then
Timer3.Interval = hour + min + sec

End If
Label5.Text = hour + min + sec

If Timer3.Interval > 1 = True Then
Timer3.Start()
Timer2.Start()
End If
End If

TextBox1.Text = "00"
TextBox2.Text = "00"
TextBox3.Text = "00"
End Sub

The Timers Tick Event

Code:

Private Sub Timer3_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer3.Tick
'If Timer3.Interval = 0 Then
WebBrowser1.Refresh()
Label5.Text = Timer3.Interval
'End If
If CheckBox1.Checked = False Then
Timer3.Stop()
Timer2.Stop()
End If
End Sub
 

A:Solved: Timer [Visual Basic]

Read other 8 answers
RELEVANCY SCORE 117.2

Does anybody know anything about mounting vritural drives or telling if a drive is a virtural drive

thanks
 

A:Solved: Visual Basic Programing

The file system object library contains a Drive object which has a Type property. That should get you there.

Welcome to TSG.
 

Read other 2 answers
RELEVANCY SCORE 117.2

I am programming a application in VB 6 (Sudoku Solver) and cannot seem to find a VB function like the MOD() function in Excel. I have bee able to create a work around using INT((Col / 3 - .001+INT(x / 3)) * 3) instead of MOD(x,3), but is there a VB function that does this that I have not been able to find?
 

A:Solved: Mod function in Visual Basic

VBA has a Mod function, and I know it's not the same language but I can't imagine a language not having a function to do modular division; since VBA and VB have the same roots, there has to be a Mod in VB. Search the help files for division remainder and see what you get.

Sorry this wasn't a more direct answer.

Actually, just now searching VBA's help, I guess VB uses Mod as an operator not a function. Try something like Int(x Mod 3), see if that doesn't work for you.

HTH

chris.

[edit]
Wee, my 500th post! I hope it's a useful one.
[/edit]
 

Read other 3 answers
RELEVANCY SCORE 117.2

Hi Guys,
I have written a programme as an assignment that calculates interest on withdrawals and deposits, etc.
I have the charges for withdrawals and deposit bonuses displayed in labels after calculations have been made, but if their value is for instance 4.50 they show as 4.5. Is there any way to get them to display as 4.50 for example, and how would I go about getting a £ sign in front ie £4.50.
Sorry for the daft question but it took a while to do and any front end improvements would look better.
Cheers guys
Gus
 

A:Solved: Visual Basic question

Read other 8 answers
RELEVANCY SCORE 117.2

Hi,
I have a program written in VB that is an executable file. This program asks 4 questions:
What is the beginning Date?
Are the Values correct?
What is the Ending Date?
Are the Values Correct?

I can execute this file using a .bat file, but can I also answerer the questions within the .bat file?

C:\Hourlyatc\atccon.exeThis calls the VB File.
echo 10/08/09>y.txtThis was my attempt to answer the first question. It did not work.
 

A:Solved: Visual Basic and .bat commands

Read other 12 answers
RELEVANCY SCORE 117.2

hi all

i have just got visual basic from my college (all legal) for my it course and i tried to make a simple program. but when i try and test it but every time it says; Compile Error, Sub or function not defined. it highlights the command LineIn, i am not sure why it is not working because as far as i know i am doing everything the same as i did in college. i dont know exactly what it is but "MSDN" did not install. it refers to this when i try to open the help menu. i may need to change a setting, not sure. if anybody could help i would be very greatful. my college gave me a module and a form to use so i have them, if somebody could write a simple program that displays somthing and i could try it , because also the display command would not work.

any help would be great

thanks

jammysheep
 

A:Solved: visual basic error - please help

Read other 13 answers
RELEVANCY SCORE 117.2

Hello i need help pls.
im taking a Visual Basic Class and i have a project that im stuck on
i need to write a case statement code for my project but i keep getting errors
the project is. Physicians use abbreviations for prescriptions. write a program that requests an abbreviation and gives its meaning.

abbreviations meaning
ac before meals
ad lib freely as needed
bid twice daily
gtt a drop
hs at bedtime
qid four times a day
this is my code i have sofar can anyone help Thanks

Private Sub btnMeaning_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMeaning.Click
Dim abbreviations = ac, adlib, bid, gtt, hs, qid As String
Dim Meaning As String
abbreviations = CInt(txtabbrevations.Text)
Select Case abbreviations
Case abbreviations = ac
Meaning = "before meals"
Case abbreviations = adlib
Meaning = "freely as needed"
Case abbreviations = bid
Meaning = "twice daily"
Case abbreviations = gtt
Meaning = "a drop"
Case abbreviations = hs
Meaning = "at bedtime"
Case abbreviations = qid
Meaning = "four times a day"
Case Else
Meaning = "Error....."
End Select
lblOutput.Text = Meaning
End Sub

 

A:Solved: Visual Basic 2008 Help

I don't have VB with me so I can't test it, but at first glance I'd try the following:
Code:
[SIZE=2][COLOR=#0000ff]PrivateSub[/COLOR] btnMeaning_Click([COLOR=#0000ff][COLOR=#0000ff]ByVal[/COLOR][/COLOR] sender [COLOR=#0000ff][COLOR=#0000ff]As[/COLOR][/COLOR] System.Object, [COLOR=#0000ff][COLOR=#0000ff]ByVal[/COLOR][/COLOR] e [COLOR=#0000ff][COLOR=#0000ff]As[/COLOR][/COLOR] System.EventArgs) [COLOR=#0000ff][COLOR=#0000ff]Handles[/COLOR][/COLOR] btnMeaning.Click
[/SIZE][SIZE=2][COLOR=#0000ff][COLOR=#0000ff]Dim[/COLOR][/COLOR] Meaning [COLOR=#0000ff][COLOR=#0000ff]As[/COLOR][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][COLOR=#0000ff]String
[/COLOR][/COLOR][COLOR=#0000ff][COLOR=#0000ff]Select[/COLOR][/COLOR][COLOR=#0000ff][COLOR=#0000ff]Case[/COLOR][/COLOR] txtabbrevations.Text
[COLOR=#0000ff][COLOR=#0000ff]Case[/COLOR][/COLOR] "ac"
Meaning = [/SIZE][SIZE=2][COLOR=#a31515][COLOR=#a31515]"before meals"
[/COLOR][/COLOR][COLOR=#0000ff][COLOR=#0000ff]Case[/COLOR][/COLOR] "adlib"
Meaning = [/SIZE][COLOR=#a31515][SIZE=2][COLOR=#a31515]"freely as needed"
[/COLOR][/SIZE][/COLOR]
and so on. That is assuming that the user types the abreviation in the text box txtabbreviations
 

Read other 2 answers
RELEVANCY SCORE 116

Hi. I wonder if anyone else has seen the ' please download visual basic components' on ie5?? When I click yes, nothing happens
but a message telling me to go to tool, windows update. That does absolutely nothing either. I'm stumped........
 

A:Solved: Browser can't read visual basic

Read other 13 answers
RELEVANCY SCORE 116

Hey there, i have this in a textbox
Code:
Private Sub txtFcid_GotFocus()

With txtFcid
.SelStart = 0
.SelLength = Len(txtFcid)
End With

End Sub
Can i include more than one textbox to share this event or i have to put this in every textbox?
 

A:Solved: event/procedure in Visual Basic 6

Read other 8 answers
RELEVANCY SCORE 116

I am trying to calculate monthly payment for a loan. Principle amount and interest is entered by user and term defaults to 30 years. For the payment calculation, I have tried different ways of setting up the formula but I keep getting "NaN" as a result. I know this means "Not a Number" but I'm not sure how I'm getting that.

Yes, this is a school assignment but it's an online course and every time I email the instructor he takes about a week to reply back. Once he does reply he says to talk to my classmates (who don't know either!)

You can see my frustration. Would someone please look over the code that I have and tell me what is wrong and why I keep getting NaN as a result? Thanks...FYI, my calculations show 3 different payment formulas I have tried (I figured one of those would do the trick but no luck yet). They have been commented out, it's hard to see that without the color coding from VB.

' Module: frmMortgage.vb

Option Explicit On

Public Class frmMortgage

Dim gsngPrincipal As Double
Dim gsngInterestRate As Double
Dim gsngPayment As Double

Private Sub btnCalculate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCalculate.Click
'
'Retrieve principal and interest rate amounts from form's text boxes
'Use Val function to convert text to values
'Divide interest rate by 1200 to get monthly interest rate
'
gsngPrincipal = Val(Me.txtAmount.Text)
gsngInterestRate = Val(M... Read more

A:Solved: Mortgage Calculator - Visual Basic

Read other 7 answers
RELEVANCY SCORE 116

Hello..

with VB versions 6, 7, .net, and others...

Wheres the best place to start?

it would be too cool.. if i could chat with a microsoft dev about this...

thanks for any tips.
 

A:Solved: Visual Basic question. Where to start ?

i bought a vb 6 book at barnes and noble and vb trial software "visual studio" came with it. solved.

i thought the question would have sparked an interesting conversation... oh well : )
 

Read other 1 answers
RELEVANCY SCORE 116

i'm student informatics practices, i'm trying to work on visual basic 2005, there is a program that i'm trying to make in it ,
i have to call a function in private sub of public by val function,so i making coding in general of coding of public and call it in private sub, it can't excpet the public function. why???????
 

A:Solved: visual basic 2005's problem

Read other 7 answers
RELEVANCY SCORE 116

I would like to produce some sounds for a game I have created in VB (call WAV type files). I have not found a way to code sound events.

EXAMPLE:

If imgBomb.left = imgShip.left then
make sound "Boom.wav" 'what real code is needed here?
end if

Is there a way?
 

A:Solved: Sound event in Visual Basic

Hi,
before I answer your actual question, one little style tip:
in your example you're testing for equality. That can work, if the variables you're working with are all integers and you know that they will at some point hit each other. If you're not sure of that, if say the bomb moves at 3 pixels per tick, and the ship might not be a multiple of 3 away, or more commonly if you're using floating point numbers and there could be round off error, you should use an inequality instead.

For your actual question, the easiest place to look for starters is in My.Computer.Audio.
You almost certainly want to make sure it is non-blocking so your game doesn't hang while the sound goes off.
Untested:
My.Computer.Audio.Play("Boom.wav", AudioPlayMode.Background)

If your game is small and you wanted to include the sound file as a resource, you could do that too.
...Play(My.Resources.Boom, Aud...
Edit: VBs MY tools are normally easier to find and use duplicates of things used elsewhere, so you could probably do the same (and most likely get slightly more flexibility) if you use for example System.Media.SoundPlayer. It sounds like it's overkill for you though.
 

Read other 2 answers
RELEVANCY SCORE 116

Hi

PLease can someone urgently help!

I wrote a programme using VBA for Word and included a Microsoft Date Picker (version 6).

Now when I sent the programme to my boss it didnt work and I managed to trace the error to the fact that his reference to Windows Microsoft Common Controls 2 6.0 (SP6) is missing. (I am assuming that the date picker is the problem because it wont display on his pc)

I dont know much about references so please can someone advise how we can fix the problem. Is it as simple as me sending him the relevant OCX file stored in the systems 32 folder on my PC??

Thanks a mil
 

A:Solved: Missing Reference in Visual Basic

Read other 11 answers
RELEVANCY SCORE 116

Hey guys

Im working on a Flash program where you can load SWF files into a shockwaveflash object by clicking on it from the FileListBox. I use this code to make it load the SWF from FileListBox:
Code:
ShockwaveFlash1.Movie = File1.Selected As ShockwaveFlashObjectsCtl
Everytime i have typed this code in, it gives me this error:
Compile error:
Error: Expected end of statement

Am i completely wrong with this code, or is it just a minor prob?
 

A:Solved: Loading SWF from FileListBox (Visual Basic 6)

Read other 9 answers
RELEVANCY SCORE 116

as my project for internship, i should create an application to make an advance report. the data is saved in microsoft access database.the report shows the graphs of test result. the first thing i wanna do is: open the file in excel from access (open external data,that is a database).
i've already made macro named Open_File to open database format (access) into excel. But the file name is static.
is it possible to change the file name in macro? so that i can open any access file in excel? i plan to make an interface where the user can browse the file name that is in database format n then open it in excel.
 

A:Solved: visual basic for making a report

Dimension a variable as a string and in an input type message box ask the user to input the name of the database. So the VBA would look like
Dim Filename
set filename = Application.InputBox(Prompt:="Enter File Name"
I hope the users can spell OK.
An alternative would be to keep a list of the database names and list them in a dropdown combo box.
 

Read other 2 answers
RELEVANCY SCORE 116

My customer got a problem with Excel. When opening a new blank worksheet in Excel, a Microsoft Visual Basic run time error occurs:
Run-time error number '9'
subscript out of range.
If we end this error, then Excel opens a new work sheet anyway. Everything seems to work fine but why does the error happend and how to solve. I have tried the following:
1) reinstall Excel - no
2) reinstall Office (uninstall first) - no
3) reinstall windows 98 - no
Please help.

Thanks & Regards.

 

A:(Solved) Visual Basic error in Excel

There's code in a file in the XLSTART directory. This could be a macro virus or residual code from when he/she tried to create a macro.

Close Excel. Find the folder on the hard drive called XLSTART. Remove any and all files from that folder...best to delete them.

Relaunch Excel. I'll be writing an article in the next TSG newsletter about how to get rid of MS macro viruses, or at least most of them.
 

Read other 2 answers
RELEVANCY SCORE 116

Hi, i am currently trying to install visual basic express edition 08 from the windows download center page. Downloading is fine but when it comes to installing it, after i have clicked i agree and the installation root folder. I get an error when it trys to download the final one (Microsoft SQL Server 2008 Express Edition (x86). It will get half way and then return with this error:

Microsoft Visual Basic 2008 Express Edition with SP1 - ENU has encountered a problem during setup. Setup did not complete correctly.

The only option i have after this is the standard send error report etc. I dont know what to do next. I can provide a dxdiag and other information that may help.

Thanks guys
 

A:Solved: Visual Basic installed error

oh forgot to say i am running Windows XP Media Edition SP3
 

Read other 3 answers
RELEVANCY SCORE 116

I am trying to take an Access 95 database and convert it to Access 2007. Right now I am running both side by side and I am recreating everything. I have a form that allows the users to pick from several different reports and run them by date and employee or class. This form is tied to a subform as well. When I go to run a report it is asking me to input a parameter value. Not sure where this is coming from. Also, my subform is also causing a #error in the fields that I have re-created. So 2 different issues. I have been working on this all day and ready to pull my hair out. This is the visual basic that I copied from Access 95. Thanks in advance for any help you can give me.

Option Compare Database

Private Sub Submit_Click()
Dim rsc As Recordset
Dim Chz As Integer

Chz = Forms!Edreports!Frame7
If Check63 Then
Chz = Chz * 10
End If
Select Case Chz
Case 1 'Class Attendance Report
If IsNull(Combo31) Then
DoCmd.OpenReport "EdRep4a", acPreview 'for Class
Else
DoCmd.OpenReport "EdRep4b", acPreview 'for Employee
End If
Case 2 'Non Attendance Reminder List
DoCmd.OpenReport "EdRep6", acPreview
Case 3 'Non Attendance Reminder Note
DoCmd.OpenReport "EdRep5", acPreview
Case 4 'Annual Employee Class Detail Report
'DoCmd.OpenReport "EdRep0", acPreview
Case 5 'Print List of Class Numbers & Names
DoCmd.OpenReport "EdRep7", acPreview
Case 6 'Print Appraisal Date Report
DoCmd.OpenRepo... Read more

A:Solved: Access 2007 and Visual Basic

You obviously have issues around the table and form/report designs.
The Parameter is normally requested when Access does not recognise a field Namein either a query supplying the report the report itself, so carefully check that all the required fields are present and spelled correctly.
The issue of #error sounds like the field is trying to do a calculation or the Control Source is not correct, although the latter usually causes a #Name error.
 

Read other 3 answers