|
I tried that and all I got was a Runtime error that said PrintPreview is nat a method. Thanks for any more help. still kinda new to this whole VB thing thanks.
Nathan
|
|
|
|
|
What version of office have you got?
Try referenceing the word object library then either have a look in the object browser or use the intellisence. I am using office 2003 and it works fine.
Jonathan
|
|
|
|
|
Yea thats probably the problem then i Have office 2000.
Nathan
|
|
|
|
|
I have office 2000 at home. If nobody else has given you an answer i will try to have a look later (baby boy allowing).
|
|
|
|
|
Thank I think with your help I got closer its now WordObj.PrintPreview = 4 now if i could just get it to stay open. Thanks again.
Nathan
|
|
|
|
|
I know the the thing closing the word document is WordObj.Quit but if i remove this the document does not even try to open. So what do i need to change WordObj.Quit to equal. Thanks
Nathan
|
|
|
|
|
Make the word instance visible like this:
WordObj.visible=true
|
|
|
|
|
Hello i've got a problem with deleting a postion with deleting the current (or selected) member (view my member form in the project link below).
http://rapidshare.de/files/1970958/FP2_FilmStore.zip.html
I can add and view next or previous members but how do i delete the currently selected member????
Any ideas as im totally stuck and have no idea.
|
|
|
|
|
what are you talking about ? combobox ? listbox ? datagrid ?
does the control have an arraylist as datasource ?
ps:there is nothing comparable to what you talk about in the link you provided. is the link broken ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
For the link go to FREE at the bottom of the page, the next page (again at the bottom) you can download my uploaded app.
And the Members (control) are stored in arraylist. Although there is nothing in there to start with.
The user enters member details (and films) when the app is run.
|
|
|
|
|
You can use class ArrayList . It has a method RemoveAt() . Or if you prefer to stay with your current array then you can use Array.Copy to copy your array to another one then copy back. Array.Copy allows you to specify how many objects to copy, what positions to copy, etc; however, it seems like a bad solution. I prefer ArrayList but the downside of using ArrayList is that you have to cast from object to your class when you get an object from the array.
|
|
|
|
|
Can you give me an example of the array.copy as i'm a newbie also how would i know which one to delete??? If you can would you be able to give an example?
|
|
|
|
|
Here is the code using Array.Copy, although it's probably easier to create a loop and copy all elements in an array except the one you want to delete.
Dim str As String = "This is my original string"<br />
Dim originalArray() As String = str.Split(" ")<br />
'now to remove the fourth word: (index 3)<br />
Dim indexToRemove = 3<br />
Dim newArray(originalArray.Length - 2) As String<br />
Dim numElementsToCopyFirst = indexToRemove 'copy everything up to index right before the element to be removed<br />
Array.Copy(originalArray, 0, newArray, 0, numElementsToCopyFirst)<br />
Dim numElementsToCopySecond = originalArray.Length - indexToRemove - 1<br />
Array.Copy(originalArray, indexToRemove + 1, newArray, numElementsToCopyFirst, numElementsToCopySecond)<br />
'now replace original array<br />
ReDim originalArray(newArray.Length - 1)<br />
Array.Copy(newArray, originalArray, newArray.Length)
|
|
|
|
|
hey guy, you will have to be more clear (2nd time !!!)
where do you get the selected item from ? a combobox ? a listbox ? a datagrid ?
i ask this because an arraylist cannot be displayed directly on a form as it is not a control (it is only a container class).
SO, i understand you want to delete an element from an arraylist with its index, but where do you get its index from ?? (see the question posted previously on this post)...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
sorry, the member is select using a next/previous button to switch between members.
So for example when i click next, the textboxes will fill with the info of that particular member; Name, address, postcode, ID etc.
|
|
|
|
|
harrysk wrote:
sorry, the member is select using a next/previous button to switch between members.
ok, so if i well understand (you explaination is not well detailled yet but i start understanding what you mean), you have a textbox that display a part of a list, and you move into that list with Previous/Next buttons. so, if you reach doing this, you also have an index variable to point to the element you want to display, right ?
this way, your index variable is positioned on the current element, agree ?
so, you can do the easy following thing :
Dim MyList As ArrayList
Dim MyIndex As Integer = 0
'You fill your list...
'You use your list...
'Then, you remove the current element :
MyList.RemoveAt(MyIndex)
and that's all...
was is so complicated to find by yourself ? maybe you don't know where to find ?!
well, you go to the MSDN, filter by Visual Basic, then search for ArrayList (its the members), so read there what seems to answer to your problem...
cheers,
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
hi all,
i'm having a problem in my web application. i'm using vb.net i want to create a table or grid on my webform by clicking a button which is displayed on the webform. and on which i can enter the data. the no of columns and rows will be specified at runtime by the user by entering into textboxes. how do i do this. please help me.
|
|
|
|
|
You should set one datagrid to fill it from databse
then u should have one insert command to get text from textbox-es to datagrid
|
|
|
|
|
How can I control the IExplorer-Bar (Tip Of The Day) from within HTML or JavaScript/VBScript?
Or is there any way to active or deactive this pane per combinationkey?
Thanx a lot.
landsmann
landsmann
|
|
|
|
|
Dear Friends
when I used Picture Box on my MDI form i am unable to open any child form on MDI form. when i remove picture box from the MDI backgeound i can see the child form. please help me to solve this problem
Your quick response will be appriciated.
Thanks
Murtuza Patel
|
|
|
|
|
set the picture as background of you MDI instead, because the picturebox is a control, and controls in the MDI mainframe are displayed upon the childre frame.
another solution is to put a panel control docked on a side of the MDI if you want it to be "split" into 2 parts (1:the picturebox, 2:the child space)
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
i need a an email validation control box implemented in vb6.. as i saw in vb.net there's a validation control box.. can it be implemented in vb6 so that i can verify the email address .. before saving it in to the data base
|
|
|
|
|
There's no equivalent control in VB6. You'd have to write it yourself. You can use the Regular Expression library that comes as part of Windows Scripting to make your life a bit easier. There's all kinds of RegEx strings that'll validate an email address for you.
I don't have any example code, because I stopped using VB6 when .NET was in Beta...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
- In such case u can use the .NET 'RegularExpression' in VB6.0 through the COM Interop.
- Using the 'RCW' the .NET Namespaces can be used in VB6 also.
With Regards
|
|
|
|
|
www.dotnetspider.com/technology/kbpages/898.aspx is telling me to bring a refernce .. but can u ppl give me a COM object of the validation control box in .net .. or tell me the url where it's present.. so that i can call it's refernce .. RCW
|
|
|
|