Click here to Skip to main content
16,011,754 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How to create my own spammer with VBscript Pin
Richard MacCutchan2-Oct-11 1:49
mveRichard MacCutchan2-Oct-11 1:49 
AnswerRe: How to create my own spammer with VBscript Pin
Dave Kreskowiak2-Oct-11 1:57
mveDave Kreskowiak2-Oct-11 1:57 
AnswerRe: How to create my own spammer with VBscript Pin
Bert Mitton3-Oct-11 3:10
professionalBert Mitton3-Oct-11 3:10 
QuestionPlaying with services Pin
DeDelva30-Sep-11 2:15
DeDelva30-Sep-11 2:15 
AnswerRe: Playing with services Pin
Dave Kreskowiak30-Sep-11 3:36
mveDave Kreskowiak30-Sep-11 3:36 
QuestionRe: Playing with services Pin
DeDelva2-Oct-11 2:12
DeDelva2-Oct-11 2:12 
AnswerRe: Playing with services Pin
Dave Kreskowiak2-Oct-11 4:52
mveDave Kreskowiak2-Oct-11 4:52 
AnswerRe: Playing with services Pin
DeDelva12-Oct-11 8:59
DeDelva12-Oct-11 8:59 
Hey i'm back from a student holiday

Thx for all the answers i will vote 4 them...
I posted the wrong code snippet

here is the code that i wanted to post :
Imports Microsoft.Office.Interop
Try

                Dim oApp As New Excel.Application()
                Dim oBook As Excel.Workbook = oApp.Workbooks.Add
                Dim oSheet As Excel.Worksheet = oApp.ActiveSheet
    
                chartRange = oSheet.range("A20", "G20")
                oSheet.Range("A20").Value = "blabla"
                chartRange.BorderAround(Excel.XlLineStyle.xlContinuous, _
                Excel.XlBorderWeight.xlMedium, Excel.XlColorIndex. _
          xlColorIndexAutomatic, Excel.XlColorIndex.xlColorIndexAutomatic)

                'Save the Workbook and quit Excel.
                oBook.SaveAs(sSampleFolder & "V.F." & idvoorexcel & "-" & Label6.Text & "-" & DateTime.Now.ToString("ddMMyyHHmmss") & ".xlsx")
                oSheet = Nothing
                NAR(oSheet)
                oBook.Close(False)
                NAR(oBook)
                oBook = Nothing
                oApp.Quit()
                NAR(oApp)
                oApp = Nothing
                System.Threading.Thread.Sleep(1500)
            End If
        Catch ex As Exception
            NAR(oSheet)
            oBook.Close(False)
            NAR(oBook)
            oSheet = Nothing
            oBook.Close(False)
            oBook = Nothing
            System.Threading.Thread.Sleep(1500)
            GC.Collect()
        End Try
    Private Sub NAR(ByVal o As Object)
        Try
            System.Runtime.InteropServices.Marshal.ReleaseComObject(o)
        Catch
        Finally
            o = Nothing
        End Try
    End Sub


By the way nice link with the NAR

Still don't know if i oversaw something?

Thx DThumbs Up | :thumbsup:
QuestionReading pdf file Pin
Anu_Bala29-Sep-11 20:52
Anu_Bala29-Sep-11 20:52 
AnswerRe: Reading pdf file Pin
Richard MacCutchan29-Sep-11 22:23
mveRichard MacCutchan29-Sep-11 22:23 
GeneralRe: Reading pdf file Pin
Dave Kreskowiak30-Sep-11 3:31
mveDave Kreskowiak30-Sep-11 3:31 
GeneralRe: Reading pdf file Pin
Richard MacCutchan30-Sep-11 6:22
mveRichard MacCutchan30-Sep-11 6:22 
GeneralRe: Reading pdf file Pin
Anu_Bala2-Oct-11 19:29
Anu_Bala2-Oct-11 19:29 
GeneralRe: Reading pdf file Pin
Richard MacCutchan2-Oct-11 21:23
mveRichard MacCutchan2-Oct-11 21:23 
QuestionMultilanguage support in VB6 Pin
MURALI RANGANATH29-Sep-11 20:25
MURALI RANGANATH29-Sep-11 20:25 
AnswerRe: Multilanguage support in VB6 Pin
Dave Kreskowiak30-Sep-11 3:30
mveDave Kreskowiak30-Sep-11 3:30 
AnswerRe: Multilanguage support in VB6 Pin
Eddy Vluggen30-Sep-11 6:36
professionalEddy Vluggen30-Sep-11 6:36 
AnswerRe: Multilanguage support in VB6 Pin
Dalek Dave1-Oct-11 22:46
professionalDalek Dave1-Oct-11 22:46 
AnswerRe: Multilanguage support in VB6 Pin
Paul Conrad2-Oct-11 19:46
professionalPaul Conrad2-Oct-11 19:46 
QuestionCombobox Problem Pin
Lek Plepi29-Sep-11 2:15
Lek Plepi29-Sep-11 2:15 
AnswerRe: Combobox Problem Pin
JR21229-Sep-11 7:14
JR21229-Sep-11 7:14 
GeneralRe: Combobox Problem Pin
Lek Plepi29-Sep-11 21:35
Lek Plepi29-Sep-11 21:35 
Questionedit web.config at runtime Pin
C#Coudou26-Sep-11 22:50
C#Coudou26-Sep-11 22:50 
AnswerRe: edit web.config at runtime Pin
C#Coudou27-Sep-11 0:13
C#Coudou27-Sep-11 0:13 
Questionhelp with printing a form Pin
molands26-Sep-11 19:45
molands26-Sep-11 19:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.