|
hi,
try this out.
For dr = 0 To (Adodc1.Recordset.RecordCount - 1)<br />
For dc = 0 To (DataGrid1.Columns.Count - 1)<br />
DataGrid1.Row = dr+1<br />
DataGrid1.Col = dc<br />
ApExcel.Cells(dr+1, dc+1).Value = DataGrid1.Text<br />
'Pass info from data grid to EXCEL<br />
Next dc<br />
<br />
ApExcel.Range("C3:D30").Select 'To establish a selection<br />
ApExcel.Selection.NumberFormat = "0.00" 'Adding different formats<br />
<br />
Next dr<br />
<br />
In EXCEL you can write from row 1 and column 1, thats y statement below
ApExcel.Cells(dr+1, dc+1).Value = DataGrid1.Text
hope m clear.
hope it helps you.
Nitin...
|
|
|
|
|
I've created a word game in VB 6. Now I want to add internet functionality to it so two people can play each other online. I basically need to know how to send a string of text from one instance of the app to another, from one computer to another over the internet.
What's the easiest, simplest way to do this? Can someone point me to a tutorial, or is it something I can do with a control and a few lines of code? Hopefully it's not some huge, hair-greying ordeal that'll make it more trouble than it's worth.
I'll keep searching on my own, but I usually stop in here in case there's a quick answer to it. I thank you in advance, friends.
"Go to, I’ll no more on’t; it hath made me mad." - Hamlet
|
|
|
|
|
|
Dear All
I have some problem regarding ActivexWebBrowser control in vb.net. I have this browser control on a windows form and i am able to navigate to URL.
Now what i am trying to do is open up a webpage(.aspx) which is having a dripdownlist and dynamically changing its selectedindex through element.setAttribute("selectedIndex", some_Value), and the problem is that the autopostback linked to this dropdownlist in not firing. I am able to change the selected item but the attached event with the aspx page is not firing. For ex. Like if we select some coutry in one dropdownlist, the corresponding states in another dropdownlist are not filling automatically which is the default behavior when we browse that webpage through some web browser.
I used http://network.programming-in.net/articles/InternetExplorer.asp?Internet%20explorer article for help.
Thanks & Regards
Gurmeet Singh
|
|
|
|
|
Hi I am writing a large program where I am using three text boxes. I am performing validation controls on these text boxes however there are some conditions
Names of textboxes
1. x
2. y
3. z
The conditions are
1. x , y , z should be numeric.
2. x and y can be blank ( x = “” , y = “”) at a time
3. z can never be blank, it should always have a numeric value.
4. if x has a value y cannot be blank and x should be non negative
5. if y has a value x cannot be blank and y should not be non negative.
6. if x and y have values y > x
7. z should be non negative
A message box should pop up each time the user clicks a button with the appropriate error ( eg : x cannot be negative , or y cannot be greater than x , etc… )
Since I am actually dealing with cells in a data grid I cannot use any sort of validation controls. I need to perform the validation using code. I am using visual studio 2005 , Visual Basic
Any sort of help will be gratefully appreciated.
snuffnit
|
|
|
|
|
Why is this text in bold ? It's quite annoying.
I guess you need to check these rules in the click event for your button then.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Welcome to the Code Project.
Please don't post the same question all over the place.
---
b { font-weight: normal; }
|
|
|
|
|
Design the logic according to your conditions. And make sure the conditions can fit the logic or you'll never go as you wish.
If you can't create the simple logic of this, you are not better then 10 years old kid.
Hint: Tree diagram method.
I'm sorry.
|
|
|
|
|
Can someone help me out with the Visual Basic source code needed that allows configuration and usage of comm ports in any PC? I am constructing an asynchronous serial communication RS-232 circuit which will include serial cables (transmitter and receiver) connected from one pc to another pc with a null modem in between. The VB program will be used to input the data and the output will appear on the remote PC.
Thanks so much!
|
|
|
|
|
How can I tell my program to read the folders that are different on peoples computers like mine for example.
C:\Documents and Settings\Code Crapper\Cookies
Now as you can see your computer has not got that, your computer (if its XP) would have.
Drive letter:\Documents and Settings\Your Name\Cookies
So my question is, how do I get it to work on anybodys computer? do I have to do something like this?
%systemroot%\DOCU~\%USER%\Cookies ????
---------------------------
If I had a £0.01 for the amount of times I have said to people "USE GOOGLE" I would be richer than Bill Gates.
|
|
|
|
|
Are you trying to access the "Documents and Settings" folder, or the current user's folder?
|
|
|
|
|
I need to get through the bit that says Code Crapper, the user name because otherwise the program wont work on any other computer with a different user name.
So far I have "C:\DOCUME~1\username (dont work)"
The 'DOCUME~1' bit works but I just need the username bit, I tried 'USER~1'and 'USERNA~1' but no luck.
All I need to know is the Username one and then I can do things like.
C:\DOCUME~1\Username?\Cookies
I can do anything else which does not require a user name too like
C:\DOCUME~1\All Users\LOCALS~1\
---------------------------
If I had a £0.01 for the amount of times I have said to people "USE GOOGLE" I would be richer than Bill Gates.
|
|
|
|
|
Ok, for the current user, just use the path variable %HOMEPATH% , which specifies "C:\Documents and Settings\Current User".
If that doesn't work, then you could try accessing the registry key:
HKEY_Current_User\Volatile Environment\HOMEPATH
-- modified at 22:31 Wednesday 29th November, 2006
|
|
|
|
|
Thank you, that really helped me, I can now make a full on computer cleaner if I put the time in
Thanks again!
---------------------------
If I had a £0.01 for the amount of times I have said to people "USE GOOGLE" I would be richer than Bill Gates.
|
|
|
|
|
The way to get the path to the root of the users profile is to use the Environment.GetEnvironmentVariable method:
Dim userPath As String = Environment.GetEnvironmentVariable("USERPROFILE")
The proper way to get the path to the current users Cookies folder is different:
Dim cookiePath As String = Environment.GetFolderPath(Environment.SpecialFolder.Cookies)
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hello,
I have a tabbed form that contains hundreds of controls. Way to many to program a _valueChanged event
for every single one of them. Is there a form or tab level event that keeps track of its child controls and whether or not their value property has changed ?
All i want to do is flip a boolean if a control's (any control) value has changed.
If you have a simple way to do this I would be obliged if you would share it.
Thank you very much,
Shawn
|
|
|
|
|
I don't think you can. I've tried doing the same with a _MouseOver event, and ended up changing each one anyway.
|
|
|
|
|
Just use a For Each statement, like this:
For Each foundFile As String In My.Computer.FileSystem.GetFiles("C:\", FileIO.SearchOption.SearchTopLevelOnly)
ListBox.Items.Add(foundFile)
Next
|
|
|
|
|
Please, excuse us while we live our own lives and do our own work at our own jobs. You make it sound like we're supposed to refresh the forum page just waiting for the next question to pop up...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I know that!? im not normally like this, I just need an answer quick as I have gotta go in a few ...
GOD DAMN IT this is the first time I have rushed people like this and I KNEW that I would get someone like you saying that...
---------------------------
If I had a £0.01 for the amount of times I have said to people "USE GOOGLE" I would be richer than Bill Gates.
|
|
|
|
|
Code Crapper wrote: GOD DAMN IT this is the first time I have rushed people like this and I KNEW that I would get someone like you saying that...
Then why rush people?
|
|
|
|
|
You didn't change "ListBox" to the name of your list box. I.e. ListBox1 or FileList.
|
|
|
|
|
Oh... crap I accidently destroyed the whole thread by deleting the first question....
-- modified at 19:10 Wednesday 29th November, 2006
---------------------------
If I had a £0.01 for the amount of times I have said to people "USE GOOGLE" I would be richer than Bill Gates.
|
|
|
|
|
Code Crapper wrote: crap I accidently destroyed the whole thread by deleting the first question
Umm... Why did you delete the first question?
|
|
|
|
|
I wanted to modify a spelling mistake (im like that) and I clicked the delete button and without thinking I clicked on the delete confirmation thinking it was just an ad to move on, sorry my bad I been to so many addy sites latly but this one is brilliant! no pop-ups whatsoever
---------------------------
If I had a £0.01 for the amount of times I have said to people "USE GOOGLE" I would be richer than Bill Gates.
|
|
|
|