Using VB To Test For Presence Of "Save As PDF Add-in"?
Dec 10, 2009
I'm working in an environment (XP SP3, Office 2007) where not everybody has the "Microsoft Save As PDF or XPS Add-in" installed on their workstations. I'm looking for a way to programmatically test for the presence of the add-in within an Access 2007 module.
I was using a loop through the Application.COMAddIns collection to test for the presence of the "Adobe PDFMaker Office COM Addin" but that no longer works when Adobe Acrobat is removed from the machine.
View 4 Replies
ADVERTISEMENT
Mar 16, 2010
I have to save the text from my textbox to a new text(notepad) file?
View 2 Replies
Nov 20, 2011
I am currently using the following code to check for the presence of an entry in a table. I choose this code because I thought it was a good idea to use a public function to reduce the amount of code required. It works fine until the field I am checking for contains a' character.I realise I need to use a parameter like @name but cannot work out how to pass the correct information to the public function.how to amend my existing code so I can use @staffNo.
Imports System.Data.SqlClient
Dim PaddedStaffNo As String
PaddedStaffNo = (TextBox2.Text.PadLeft(4, "0"c))[code].......
View 1 Replies
Dec 8, 2011
I am working on a solution to a problem at work where we can't tell if someone is on the phone or just sitting there. We use Microsoft Lync to place our calls and I was hoping to be able to add a bit of code to an existing .net application to show the presence of the person logged into the machine. That info will send that out via USB to an indicator light I previously built.
So basically I am trying to create a .net version of those 'ON AIR' lights you see at radio stations.
I have been searching for the last few days and haven't found a solution. I also downloaded the Microsoft Lync Controls SDK, but no luck with that either.
View 2 Replies
May 5, 2011
I am currently using the following code to check for the presence of an entry in a table. I choose this code because I thought it was a good idea to use a public function to reduce the amount of code required. It works fine until the field I am checking for contains a ' character. I realise I need to use a parameter like @name but cannot work out how to pass the correct information to the public function. Can someone show me how to amend my existing code so I can use @staffNo.
Imports System.Data.SqlClient
Dim PaddedStaffNo As String
PaddedStaffNo = (TextBox2.Text.PadLeft(4, "0"c))
[code]....
View 12 Replies
Feb 10, 2012
How would I check a given string for the presence of any match with a character listed in another string. I'm just looking for a binary result.
In other words, how would I write the VB.NET function called IsPresent in the following code snippet?
Result = IsPresent(AnyString, MyTestString)
For example, if MyTestString = "XYZ" then I want the following results for the given AnyString values:
MUTTON, Result = No
BUZZ, Result = Yes
HAPPY, Result = Yes
FISH, Result = No
View 2 Replies
Jul 22, 2009
I am trying to filter a ListBox based on the presence of a string. Basically, if there is a ListItem that doesn't contain the string then I want to remove all ListItems that do contain the string. Here is what I have tried:
Dim Item As ListItem
For Each Item In CtheList.Items
If Item.Text.IndexOf("W:") = -1 Then
[Code].....
View 4 Replies
May 2, 2011
net application. .exe generated is sufficient to use software. since I have 700 MB (~8k media files) data to include as part of installation I do not want to use visual studio deployment wizard.
[Code]....
View 2 Replies
May 21, 2012
Everything is written in codes:
vb
'CHECK IF "sIntroSequence" IS AVAILABLE IN TEXT FILE. Dim checkthevalue As String = My.Computer.FileSystem.ReadAllText("c: est.txt") If checkthevalue.Contains("sIntroSequence") Then '"INTRO SEQUENCE" STRING IS AVAILABLE. 'CHECK
[code]....
I can't seem to get the checkbox checked according to presence of a particular string in a text file. It looks like it should work but it doesn't.
View 16 Replies
Sep 25, 2010
I don't understand the error, Argument not specified for parameter 'test' of 'Public Shared Function TestThis(test As String)'.
Partial Public Class Form1
Shared Sub ReceiveCallback(ByVal ar As IAsyncResult)
Form1.Invoke(TestThis, New Object(){"test"}) 'error
[code].....
View 6 Replies
May 25, 2009
[code]...
and from VB6 project I reference to Test.dll but an error messege was appear A reference to Test.dll file could not be added (If I create VB NET project and reference to file Test.dll it OK )
View 10 Replies
Sep 20, 2011
Probably a dumb question, but can you write a unit test project in one language to test against another project in a different language?I'd like to translate one of our VB assemblies into C#, but want to build unit tests to verify the results. I've tried to set a unit test project up to do this, but I can't seem to access the VB code within a unit test... I can't figure out if I'm just missing/doing something stupid, or it really isn't allowed.
View 2 Replies
Jan 12, 2010
I am playing with the virtual machine version of the Google Chrome OS. I need a web app that I KNOW is made in visual basic to test to see if it will work with it or not. This will help determine if it's possible to make web apps for this Google OS in VB.
View 4 Replies
Apr 29, 2009
I have a query string called propID and I wanna check if the passed value in it is a legal integer or not to avoid throwing an error that might reveal info about my database, how can I do it? In other words, I want something like -but in vb.net- : IF QueryString("propID").Content.Type = "int32" Then Proceed
View 5 Replies
Apr 24, 2012
Create an app for the DMV that grades the written portion of the driver license exam.Theexam has 20 multiple choice questions. Here are the correct answers to the questions:1=A 2=C 3=D 4=A 5= B 6=D 7= B 8=C 9=A 10=A 11=B 12=B 13=C 14=D 15=C16=A 17=C 18=B 19=D 0=DStore the correct answers in an array. The user interface form should allow the user to enter an answer for each question.When the user clicks the Score Exam button, the application should display a message showing whether each question was answered correctly or incorrectly, and whether the student passed or failed the exam.A student must orrectly answer at least 15 of the 20 questions to pass.Input validation: Only accept letters A, B, C, and D
here is what i have so far:
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
[code]....
View 4 Replies
May 11, 2011
I have a large VB/SQL application that I have created a problem in. I have a table of procedures that have an active flag on them. This flag can be toggled through a user screen. Other screens access this same table to populate dropdowns. The values are stored in the table as the ID field (PK). The problem I have is that I am selecting the dropdown values based on the Active flag. If I select a record that has a procedure stored in it that has been made inactive, I get the old Object Not Set to an Instance.... error.
What I want to be able to do is check for the value in the record when populating the dropdown and allow the record to be displayed by bypassing the SQL error and just showing the dropdown value as blank while not altering the record itself. I hope I'm making sense. Code is below.but I'm back in app programming after being a SysAdmin for 20 years and I'm still rusty.[code...]
View 1 Replies
Jun 12, 2011
If the condition = true How do i select all records stored in .txt (temporary text file) to be updated in sql table How do i do that.
View 10 Replies
Jul 3, 2009
Can someone tell me if it works on windows Vista and Mac? And any other OS.
View 3 Replies
Sep 17, 2009
How would a person test to see if a usb device is on? I have a program with a usb reader attached to it and would like to throw an exception if it is not on.
View 2 Replies
Jun 16, 2011
In my program I need to test whether an entry is available I ue the following code:
If Not (westTF(Me.K) < 0) Then
If westTF(Me.K) Then
Exit Sub
End If
End If
This does not function, but when I remove the outer IF it is OK. ( I need to test otherwise an error is generated when West is exhausted).
View 6 Replies
Sep 21, 2009
I have 3 textboxes, I want to test if user has filled out only any 2 of 3. What's a good algorithm?
View 6 Replies
Jul 22, 2010
I was asked this question recently in a test, which I didn't pass. For the life of me, I couldn't spot what the problem was. It's probably something really obvious as well, but even a colleague of mine couldn't spot it either. The best I could come up with was issues with bottlenecks and naming inconsistencies of parameters! I blame it on the fact I've not done any vb.net for years, I've been doing C# mostly these days
[Code]...
The question: This function, although it will successfully sort a datatable, has a major problem with it.What is the problem? Re-write the function in either C# or VB.Net using LINQ.
View 2 Replies
Feb 28, 2009
I have found a Regex that test if the text passed to a TextBox is an email.
If Regex.IsMatch(email.Text, "^(?("")("".+?""@)|(([0-9a-zA-Z]((.(?!.))|[-!#$%&'*+/=?^`{}|~w])*)(?<=[0-9a-zA-Z])@))" + "(?([)([(d{1,3}.){3}d{1,3}])|(([0-9a-zA-Z][-w]*[0-9a-zA-Z].)+[a-zA-Z]{2,6}))$") _
[code]....
View 4 Replies
Apr 23, 2012
I've been looking for a tuto to use resx but I only found some where the resx depends on the localization(and the language of the browser).How can I tell my app to use a certain resx when a certain variable has a certain value.For instance I'd like to use default.aspx.de.resx when xyz=1.
Edit:I ve heard there's an issue to override InitializeCulture.
Public Class FormBase
Inherits Page
Protected Overrides Sub InitializeCulture()
[code]....
How could I access to Master.LanguageID in this class?
View 1 Replies
May 31, 2011
I work with a database, the db is on the <project_folder>database folder.
If want to open the database, Application.StartupPath returns[code]...
So I have to compile the project to an .exe to make tests.
View 4 Replies
Nov 12, 2010
We have a property whose job is to look up a description. If the lookup fails it should show an empty string.
So we can code the property like this:
If foo.bar Is Not Nothing Then
Return foo.bar.Description
Else
[Code]....
But are there any problems (performance, purity, other?) with just catching and ignoring the error?
You sometimes read it's expensive to throw an exception but I am not sure whether the author means it's expensive to build in exceptions using the Throw keyword (which I am not doing) or whether he means it's expensive to allow exceptions to occur (as I would be doing).
View 2 Replies
Jun 10, 2009
Is there any code to test the webcam if it's on or off ?. i mean, i need a code that telling me if my webcam is on.
View 2 Replies
Aug 13, 2011
I am building an application to update a database.I have a Map table where row 0 holds the target table field name Row 1 holds an update value or Source table Column name Row 2 holds a Where condition eg
Map: CustNo CustName Val1 Val2
Update: 25
Where: =[CustNo] > [Fld14]
In this example I am going to update the Target Table Field 'Val1' to 25 where the Target Table Rows have Field 'Val1' data > 14 AND Target Table Field 'CustNo' = the Source Table Field 'CustNo' AND the Target Table Field 'Val1' > the Source Table Field 'Fld14' Where I am stuck is I at the moment is wondering how I should convert the strings into test conditions as I iterate the Target Table eg Say my test string is stTest and it holds " = 25" For each dr as datarow in dtTarget
some code
... stFld = "Val1"
if dr(stFld) { convert stTest into literal '=' and then 25}
... do something the only way I can think is to build up a series of test cases like:
Select stOp
Case stOp = "="
Case stOp = "<>"
etc.
View 17 Replies
Apr 18, 2012
I tried to make an unit test for this method which is pretty simple only add an object into the data base and if it works well returns true
[Code]...
View 1 Replies
Jun 11, 2012
when I added code to impersonate a user it crashes my app when unning on a new test pcalso data from an access database no longer populates my list boxesso first please help me to pass credentials to teh commands I need to run on remote machines , here is my code so far...
first a new class
Imports System
Imports System.Security
[code]......
View 21 Replies