vb

Writing a logon script for different users in VB, needs to be able to map drives. Need some help.

What is happening now, is that .bat files are ran on logon, which executes mapping the drives. We now however want to switch these into a VB script. A couple problems, however: There are 18 drives to map (f through w) The users aren't group correctly (if at all). I'm probably going to change them into the correct groups, hopefully thre...

Populate label from single field in sql server

I have a column in a table that contains a message and I want this message to be displayed in a label. Here is my code which currently doesn't populate the label. Protected conString As String = ConfigurationManager.AppSettings("sqldirectory") Dim cnn As New SqlConnection(conString) Dim cmd As New SqlCommand("select message from [da...

Comparing Strings in VB 6.5

I am trying to compare two strings in VB but compareTo, compare, equals etc all give compile errors. If String.Compare(string_one, string_two) = 0 Then ...do stuff End If If String.Equals(string_one, string_two) Then ...do stuff End If Now both lines give me the error Compile error: Expected: ( and it ...

Runtime Error '3709' while accesing SQL database in VB6

I have a VB6 application which someone wrote, which does not work for only some users who try to use it. This is the code running which returns an error: On Error GOTO error_handler .. Set db = New ADODB.Connection db.Open "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=****;Password=****; Initial Catalog=***;Data Source=*...

Column count check for csv before the csv is loaded in multiple worksheets using macro

Hi, I have an workbook with 3 worksheets.I want to load the a single sectionedwise csv to the multiple worksheets but before loading the csv I need to do the column count check to ensure that correct csv is loaded. the csv will be as follows : #3GMACRO,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,, IMSI,IMEI,Date,Time,UMTS MACRO-PARAMNAME,...

VB.NET - For Each in WPF-Controls

Hey people, I want to check some childelements in my WPF-Form. In WindowsForms that was quite easy with (like): For Each control as Textbox in Me control.text = "hello people" Next How do I do that in WPF within my XAML.VB-File? I got a listbox with some childelements here which I want to analyse. Greetz and thanks for your ideas! ...

Facebook Login with XMLHttp

How can I login to Facebook using XMLhttp? ...

Using an Excel function in VB question.

So today a received an excel spreadsheet with over 20,000 cells onto it. I had to separate them by name (ever 14 rows starts a new client), and total the columns of prices. So, I wrote: Sub NewSpace() ' ' NewSpace Macro ' ' Keyboard Shortcut: Ctrl+p ' 'create the count variable, initilize it to 17 Dim count As Integer ...

Can I import INTO excel from a data source without iteration?

Currently I have an application that takes information from a SQLite database and puts it to Excel. However, I'm having to take each DataRow, iterate through each item, and put each value into it's own cell and determine highlighting. What this is causing is 20 minutes to export a 9000 record file into Excel. I'm sure it can be done q...

Passing from Form to Query in Access/SQL/VB

Access 2007 / SQL / VB I have a query: SELECT Count(*) AS CountOfCR1 FROM PData WHERE (((PData.DestID)='CR1') And (((PData.AnswerTime)>=Starting)<Ending+1)); I am trying to pass the variables Starting and Ending to the above query from the below form: Starting = StartDate & " " & StartTime Ending = EndDate & " " & EndTime On Error G...

Do all RDO Errors cause a runtime error?

I am looking at VB code and I see there is an RDOErrors collection where Server/ODBC errors are placed. Do all of these errors cause a runtime error? or is it possible there could be an RDOError that gets placed in the collection that doesn't cause a untime error and therefore require you to loop through the collection? ...

Outline to HTML via Recursion in VB

I'm trying to convert an outline control to HTML with the end result to look like this: <ol> <li>Level 1A</li> <li>Level 1B <ol> <li>Level 2A</li> <li>Level 2B</li> </ol> </li> <li>Level 1C</li> ...

Splitting address, city, state, and zip, lacking delimiters, in excel

Hey all, I have an excel spreadsheet that contains entire addresses packed in a single cell without delimiters. The addresses look like this: 2701 NW 64TH TER MARGATE FL 33063-1703 901 NE 8 ST HALLANDALE BEACH FL 33009-2626 1840 DEWEY ST UNIT 305 HOLLYWOOD FL 33020 3049 NE 4 AVE WILTON MANORS FL 33334-2047 650 NE 56 CT OAKLAND PARK ...

How do I make a system call and reload a file in a Visual Studio 2010 macro?

As you read this, though I have pretty good experience in C++ and Java, please keep in mind that I am a complete beginner when it comes to VB. :) Here is one idea of what I want to do: Option Strict Off Option Explicit Off Imports System Imports EnvDTE Imports EnvDTE80 Imports EnvDTE90 Imports EnvDTE90a Imports EnvDTE100 Imports Syste...

Translate Obscure LINQ

Some long-gone developer left the following LINQ query behind with no documentation and I'm struggling to understand what it does (and therefore if it's doing it right). Can someone help translate this, either by breaking it into pieces or providing the SQL equivalent? Dim matches = From mc In mcs _ Join ri In r.Items On ...

My.Computer.FileSystem.DeleteDirectory() with read only files?

I recently came across a problem with My.Computer.FileSystem.DeleteDirectory(). It will not delete read only files. I found out by Googling that I could delete the read only files by changing the file attributes to 'Normal'. So I wrote a recursive function, as below. Private Sub DeleteDir(ByVal dir As DirectoryInfo) For Each d In ...

online chat customer care

hello every one, i m doing a project using vb .net visual studio2005 . i need to develop a online chat application on my website for customer care supports. so please can anyone suggest me from where i should start and which technology i should use for this web based application... please reply me as soon as possible.... thanks & rega...

VB macro to open a SaveFileDialog using the Microsoft Project application

I'm working on a VB macro which generates an Excel report out of a Microsoft Project planning. In order to save the report, I have to open a Save File Dialog by calling GetSaveAsFilename("name", , , "Title") but I don't want to use the Excel.Application for this because I'm supposed to activate it first which doesn't make sense. How s...

How can I run command prompts with VBA and restart if they fail?

I'm a Perl programmer with some nice scripts that go fetch HTTP pages (from a text file-list of URLs) with cURL and save them to a folder. However, the number of pages to get is in the tens of millions. Sometimes the script fails on number 170,000 and I have to start the script again manually. It automatically reads the URL and sees if...

Visual Basic or VBScript as Java Scripting Engine

Hi all, I consider implementing a ScriptingEngine à la JSR223 for Visual Basic or VBScript (because I don't know any implementation, except the abandoned BSF engine from IBM). I know it will take me some native programming, but I don't know where to start. One idea would be to integrate windows scripting host into java, maybe by using ...