|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Syntax ErrorI have got some code to attach a doc to an email but I have a few
problems with it. The first is a syntax error on the code below: ElseIf ListBox1.Items.ToString <> ("") Then Dim Counter As Integer For Counter 0 To listbox1.Items.Count - 1 the 0 is underlined with a syntax error. The other thing is that actual attachement, I have used the open dialogue to select a file and it comes back with a unhandled exception as below: Could not find file 'C:\System.Windows.Forms.ListBox+ObjectCollection'. <trevor.niem***@za.syspro.com> schrieb:
>I have got some code to attach a doc to an email but I have a few What exactly do you want to archieve?> problems with it. > The first is a syntax error on the code below: > > ElseIf ListBox1.Items.ToString <> ("") Then > Dim Counter As Integer 'For Counter As Integer = 0 To ListBox1.Items.Count - 1'.> For Counter 0 To listbox1.Items.Count - 1 > > the 0 is underlined with a syntax error. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> Okay don't worry I got it to work:
Dim Counter As Integer Counter = ListBox1.Items.Count - 1 Dim emailAttachment As Attachment = New Attachment(ListBox1.Items(Counter)) I do however need some help taking various text fields and adding them to a word template that I can create. And then add to the email going out or maybe to the email body.
same sub, multiple control click events
same sub, multiple control click events Results differ between Windows App and Console App. Why??? Control image property locking image file even after image cleared Losing accented characters getting account names from system best starting point for complete newbies? screen resolution independent Hide web service in COM interop assembly Comment renommer une Node d'un TreeView en VB2005 ? VB web browser freezing |
|||||||||||||||||||||||