Click here to Skip to main content
15,890,717 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionSql DataBase Auditing Pin
Juliafuentes8-Mar-06 5:45
Juliafuentes8-Mar-06 5:45 
Questionhow to show image in coding? Pin
campbells8-Mar-06 5:32
campbells8-Mar-06 5:32 
AnswerRe: how to show image in coding? Pin
Chatura Dilan8-Mar-06 13:46
Chatura Dilan8-Mar-06 13:46 
QuestionVisual Basic Newbie Pin
dream_weaver8-Mar-06 5:26
dream_weaver8-Mar-06 5:26 
AnswerRe: Visual Basic Newbie Pin
Steve Pullan8-Mar-06 11:41
Steve Pullan8-Mar-06 11:41 
QuestionError message, Help Pin
Spaz808-Mar-06 3:55
Spaz808-Mar-06 3:55 
AnswerRe: Error message, Help Pin
Steve Pullan8-Mar-06 11:44
Steve Pullan8-Mar-06 11:44 
QuestionStrange VBA problem with Excel Pin
Waldermort8-Mar-06 3:05
Waldermort8-Mar-06 3:05 
I have the following function
Public Function AddSheetCopy(CopyName As String, NewName As String)
    For Each xlSheet In xlApp.worksheets
        If xlSheet.Name = NewName Then
            MsgBox ("sheet exists")
            Exit Function
        End If
    Next xlSheet
    MsgBox (xlApp.worksheets(1).Name)
    xlApp.worksheets(CopyName).Copy after:=xlApp.worksheets(xlApp.worksheets.Count)
    xlApp.activesheet.Name = NewName
    Set xlSheet = xlApp.activesheet
End Function

It's pretty simple, I just want to make a copy of a worksheet, and give it a new name. Problem is it's not working exactly as it should. You will notice in the above code there is a message box to display the name of the first sheet, when running the code as above it works, but if you comment out that message box, it makes a copy of the current active worksheet.

Obviously I don't want to be plagued with this message box, but I am unable to make the function work without it.

Any ideas?
QuestionHow to calculate exact difference between two dates? Pin
Krishnaraj Barvathaya B8-Mar-06 2:19
Krishnaraj Barvathaya B8-Mar-06 2:19 
AnswerRe: How to calculate exact difference between two dates? Pin
Chandana Subasinghe8-Mar-06 3:00
Chandana Subasinghe8-Mar-06 3:00 
AnswerRe: How to calculate exact difference between two dates? Pin
Chandana Subasinghe8-Mar-06 3:09
Chandana Subasinghe8-Mar-06 3:09 
QuestionInsert Link in RichTextBox Pin
qcarroll8-Mar-06 1:43
qcarroll8-Mar-06 1:43 
Questionstoring and displaying images from database Pin
uglyeyes8-Mar-06 1:21
uglyeyes8-Mar-06 1:21 
AnswerRe: storing and displaying images from database Pin
uglyeyes8-Mar-06 17:59
uglyeyes8-Mar-06 17:59 
QuestionIs it possible to run a vb.net exe file on Windows'98 OS Pin
hisuman1007-Mar-06 23:31
hisuman1007-Mar-06 23:31 
AnswerRe: Is it possible to run a vb.net exe file on Windows'98 OS Pin
H@is@here7-Mar-06 23:47
H@is@here7-Mar-06 23:47 
GeneralRe: Is it possible to run a vb.net exe file on Windows'98 OS Pin
Chandana Subasinghe7-Mar-06 23:52
Chandana Subasinghe7-Mar-06 23:52 
GeneralRe: Is it possible to run a vb.net exe file on Windows'98 OS Pin
Chatura Dilan8-Mar-06 0:27
Chatura Dilan8-Mar-06 0:27 
GeneralRe: Is it possible to run a vb.net exe file on Windows'98 OS Pin
Dave Kreskowiak8-Mar-06 0:41
mveDave Kreskowiak8-Mar-06 0:41 
GeneralRe: Is it possible to run a vb.net exe file on Windows'98 OS Pin
Chandana Subasinghe8-Mar-06 0:59
Chandana Subasinghe8-Mar-06 0:59 
AnswerRe: Is it possible to run a vb.net exe file on Windows'98 OS Pin
kostasdiktia28-Mar-06 7:04
kostasdiktia28-Mar-06 7:04 
AnswerRe: Is it possible to run a vb.net exe file on Windows'98 OS Pin
Mohit Namdeo12-Mar-06 23:36
Mohit Namdeo12-Mar-06 23:36 
QuestionWrite a .Net user control for VB6 Pin
User 26989677-Mar-06 22:48
User 26989677-Mar-06 22:48 
AnswerRe: Write a .Net user control for VB6 Pin
H@is@here7-Mar-06 23:07
H@is@here7-Mar-06 23:07 
QuestionHiding of containing class property in propertyGrid Pin
kumarprabhakar747-Mar-06 22:23
kumarprabhakar747-Mar-06 22:23 

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.