|
i run ok for the 0 which mean the first line.
when it go to the 11 line then something goes wrong with the data it will get the last value of the data. u know wat i mean? when it get the last data of the last row but which is not. when it go to the next row, there is nothing to get so error came out.
But i didnt control the VB to skip the 11 line...
|
|
|
|
|
on which line and text error occurs ?
either datagrid1.text or other ?
IT IS NOT AS IMPORTANT AS WHETHER YOU SUCCEED OR FAIL BUT WHAT IMPORTANT IS THAT YOU TRY YOUR BEST.
SO ALWAYS TRY AT YOUR LEVEL BEST
|
|
|
|
|
the code which i have underline it.
I know y there is an error because when i read there is no more information cause it have skip to the last line which i did not ask it to do so... so i not sure happen with the system....
when i run the system i check one by one... example, suppose it will pass 14 row with 5 column information each of it.
when it goes to row 12, then the first 2 colum data which is not the correct one the vb itself have skip to row 13-14 and get the value. after that sure it will have error becasue when it try to read the row 13, but the arrow have been point to the last 14 row b4 when it put the value to row 12, so the next data will be 15 which is an empty one.
|
|
|
|
|
campbells wrote: For dr = 0 To (Adodc1.Recordset.RecordCount - 1)
For dc = 0 To (DataGrid1.Columns.Count - 1)
DataGrid1.Row = dr
I am not entirely sure I understand your problem, but should not you put the line "DataGrid1.Row = dr" between
"For dr = 0 To (Adodc1.Recordset.RecordCount - 1)"
AND
For dc = 0 To (DataGrid1.Columns.Count - 1)"
so that the row is changed after all the columns are processed?
Hope this helps.
Shreekar
http://shreekarishere.blogspot.com
|
|
|
|
|
at first the DR which mean the row~ since i'm showing the data in the datagrid first, then pass to EXCEL.
DC which is the column , which there is 5 column.
when goes to row 1, then pass the datagrid column data to excel, after passing the row 1 column data, then next dr which is ROW 2.
|
|
|
|
|
try this
for dr =0 to datagrid1.rows-1
IT IS NOT AS IMPORTANT AS WHETHER YOU SUCCEED OR FAIL BUT WHAT IMPORTANT IS THAT YOU TRY YOUR BEST.
SO ALWAYS TRY AT YOUR LEVEL BEST
|
|
|
|
|
dc suppose to be column...??
For dc = 0 To (DataGrid1.Columns.Count - 1)
|
|
|
|
|
i m so sorry
for dr =0 to datagrid1.rows-1
IT IS NOT AS IMPORTANT AS WHETHER YOU SUCCEED OR FAIL BUT WHAT IMPORTANT IS THAT YOU TRY YOUR BEST.
SO ALWAYS TRY AT YOUR LEVEL BEST
|
|
|
|
|
The problem is that your assuming that a DataGrid row is the same as a Row in the Dataset. It's not. You shouldn't even be getting the data out of the DataGrid. Just use the RecordSet object as your source of data to copy to the Excel sheet. The DataGrid is just for showing and editing what's in the RecordSet, keep it that way.
Now, since you're using VB.NET, why are you using the old ADODB objects when the .NET Framework provides much better and easier to use DataSet classes?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hello,
I have to deploy my application and have been instructed to use merge modules. As the client computers don't have any CR on them. However when I right click on the setup project and add merge modules. There are no msm files for crystal reports.
Can anyone tell me what should I do to add these files, so my project can be deployed and ran on the clients machines.
I am using VS.Net 2005 and Crystal Reports 10. I have been told to enter a lience key. How do I do this?
Thank in advance,
Steve
-- modified at 22:44 Sunday 29th October, 2006
|
|
|
|
|
|
Hello there,
I have a VB app that creates and runs MS PowerPoint 24/7. When I first started, the application runs Ok as I expected, but then sometime the COM's error from MS PowerPoint throw an exception such as "PowerPoint currently experiencing the problem. We are sorry for the inconvenience, bla, bla... Click Ok to restart the MS PowerPoint", and the system is hung till user must click Ok to dismiss the error dialog box. Since this application runs 24/7 so in the middle of the night, there is noone there to click the OK button to restart the PowerPoint.
I am trying every posible ways to prevent this error to show up such as kill the PowerPoint Object and reinstantiate, reboot host if error happen... Howerver, none of my code worked since the system was hung unexpectedly because MS PowerPoint throw the error and system was hung before the pointer returned back to my code.
I am wondering if there is any way I can sense the error message from PowerPoint and prevent it before it shows up as the error dialog box. Or is there any way I can send code to click the Ok button to dismiss the error diaglog box. Please give me some advice where to start, or point me to some direction. I know there are messages que but I don't know how to access them and how to find the ID of the error windows. I am totally lost in this part now. Please give some advice.
thanks in advance for reading this message
Paula
|
|
|
|
|
Why are you running the powerpoint user interface on the server in the first place? Doesn't it have any API?
---
b { font-weight: normal; }
|
|
|
|
|
Thank you for the question Guffa.
This is the spec from the user. I can not change it. Here is how it works
VB.Net reference to PowerPoint Primary Interop Assembly
when VB exe file starts, it loads up the PowerPoint show
PowerPoint object plays the show.
There is also a timer instantiated when the VB form created.
When the timer tick, VB exe file goes to same place to see if there is new show created. if there is new show, stop current show and play new show.
The error of COM's problem just throw whenever it wants, and I have no idea how to work with it anymore.
thanks again for reading my message
|
|
|
|
|
I'm an instructor teaching an undergraduate course that uses VB 2005. I'm trying to make an example that uses the new MenuStrip control from the 2.0 framework and I have a question regarding this. I want to design a base form that has a MenuStrip and then on each child form make additions to this MenuStrip in the designer. In VB 2003 and the MainMenu control this was possible, but I am not finding a way to obtain the same functionality with the MenuStrip. I know how to do it through code, but this is a little above the level of my class. Any suggestions or pointers would be greatly appreciated.
-- modified at 23:38 Monday 30th October, 2006
|
|
|
|
|
Hi,
Is it possible to determine the .net framework version number programmatically using vb.net.
Thanks.
|
|
|
|
|
|
If there isnt, then why does MSDN say there is in C++ and C#?
|
|
|
|
|
Because you can do more with C++ and C#, that's why.
|
|
|
|
|
Utter BS.
The Environment.Version[^] property will tell you what version of the CLR your code is running under.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
.NET Framework
Supported in: 2.0, 1.1, 1.0
.NET Compact Framework
Supported in: 2.0, 1.0
Maybe they were referring to it not existing in 1.1.
He was a snowflake, like other "unique" snowflakes, falling down, getting stepped on, and pushed aside to disappear.
|
|
|
|
|
Yes, there is. click[^] and follow the link in the post.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
|
the first place you have to go befor post here
[^] go and play somewhere else
Tamimi - Code
|
|
|
|
|
Tamimi - Code wrote: the first place you have to go befor post here
[^] go and play somewhere else
Given that he can't spell what he is asking for, I would guess google isn't working for him.
|
|
|
|