I am trying to get a macro convert from VBA over to vb.net and I am getting a type mismatched error and can't figure it out. I am hoping someone here will be able to help me.
This is the code.
Sub SortRawData()
Dim oSheet As Excel.Worksheet
Dim oRange As Excel.Range
Try
oSheet = SetActiveSheet(mLocalDocument, "Sh...
I have an application than disables the screen saver temporarily in order to run a slide show. I use this to turn it on or off:
i = SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, active, Nothing, SPIF_SENDWININICHANGE)
This works fine in XP. In Windows 7, it disables the screen saver properly. However, when it is enabled again, at the ...
I have an uploadify control working fine in a vb.net web application - however whenever I switch on cookieless session state in web.config (cookieless="true") - it stops working.
In my upload IHttpHandler I can see that the data stored by uploadify is nothing:
Private Function Process(ByVal context As HttpContext) As String
Dim F...
Ok, I'm stumped here - the folowing code errors with Procedure or function 'importsp_CreateDiallerBatch' expects parameter '@BatchName', which was not supplied
Dim cmd As SqlCommand = New SqlCommand()
cmd.CommandText = "importsp_CreateDiallerBatch"
cmd.Connection = cnSQL
cmd.Parameters.AddWithValue("@Batc...
I've noticed that when I Response.Redirect to an .aspx page, it sometimes displays a cached page instead of actually executing the page and pulling fresh data from the database.
I'm not using output caching or anything special in .Net here -- this is a CRM, and the caching is either happening on the client or, perhaps more likely, autom...
I am writing a windows desktop application in visual basic and I need it to connect to a SQL database, take a rows unique id, and using that number generate a file from the binary data that is stored in the SQL database and save it to a file directory.
The part that is hanging me up is the creating the file from the binary SQL data.
...
ok im reposting this question cause i got some off track answers last time.
I have 3 aspx pages - page1, login and page3. Now when i goto login page from page1, after i login and goto page3 i should be able to open a popup on that submit and the login should change to page3. but if i goto login page directly, the popup should not open an...
i saw this article on msdn forum about Request.UrlReferrer but didnt really understand it well. I need to use this property in one of my pages to see where the user is coming from. My case is if the user comes from certain page, i need to have an if condition and should open up a popup as well as redirect page to next page. if the Reques...
i was thinking of using request.urlreferrer, but apparently norton and other antivirus block it. So i need a workaround to that. simple case -
i have a login page and after logging in it should open up a popup and the login page should move to page 2. But this can only happen is i came from a certain page. how can i do this.
If previous ...
I'm sure this question has been asked a million times, however I haven't been able to find an answer that solves my problem.
I am programmatically adding some custom user controls to a PlaceHolder which I have on a simple aspx page. All of the user controls Postback's work correctly except for one which has a Gridview on it.
For some r...
Is it better to use friend or public forms in vb.net? What are the advantages of each?
I notice when you import a vb6 project, the forms come in as friend, but when you add a new form in vb.net it is public. I have not seen any difference in the way they work, though, so I must be missing something.
...
For some reason I have noticed that at run time when looking at my source of my ASP.NET page there are tags being created.
<input type="hidden" name="_VIEWSTATE" id="_viewstate" value="..lots of text.." />
and
<input type="hidden" name="_EVENTVALIDATION" id="_EVENTVALIDATION" value="..lots of text.." />
Why is this and what is it ...
I’m about to start work on a new LOB application which is mainly forms over data. I am going to use either WPF or Silverlight but am not sure which technology to use. Silverlight seems to have everything I need with the bonus of being cross platform as well. Is there any reason why I should use WPF in this context? or is Silverlight the ...
Hello all
I have some project that written in .net 3.5 environment.
But there still some dependency to .net 2.0 .
How I can find this dependence parts of the code that use the old API ?
I just want to update all code to 3.5 version.
Project written in vb.net.
Thanks a lot for help.
...
I know how to call the Union extension method, e.g.
Dim r = productFirstChars.Union(customerFirstChars)
However I do I do this with the Linq syntax, e.g.
from productFirstChars select ????
...
see also Good VB.Net 2008/3.5
Reference Book? and Converting C#
knowledge to VB.NET any potential
problems?
Or other good resource for an experienced (5 years C#, before that 10 years C/C++) C# programmer to learn VB.NET.
I am being forced to program in and understand a lot of VB.NET code (I was not told that most of code w...
In my database MYDB I have a table called MYTABLE and I have a column called Description. I am saving a long description in there with multiple HTML tags.
How can i return the values and not include all the HTML tags?
Is this even possible? What will be the best way of doing this? In the SQL statement or in code behind? And how will I ...
Dim x As Integer = 1.8 \ 1
Error:
Option Strict On disallows implicit
conversions from 'Double' to 'Long'
What Long??
EDIT:
Apparently Visual Basic attempts to convert any floating-point numeric expression to Long. OK, this part is clear.
Now, I can use the
CType((Math.Round(myResultingSingle)), Integer)
but what for ...
Hey there,
Hopefully someone can point me in the right direction or knows the answer.
I'm using a recreation of the sample MSDN SessionStateStore provider which is designed for MSSQL server.
This one was done by Harry Kimpel.
The particular issue I am having is with the "CreateUninitializedItem" routine.
Basicaly the error I get often...
Hi,
I have a table, lets call it Objects. It has a predefined set of records looking like this:
ObjectId ObjectName
1 Salmon
2 Trout
3 Seabass
4 Shark
Etc..
So, this I would like to implement somehow as an enum. But what's the best way, implement it in the database creating tables for it or in the app...