Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old October 17th, 2004, 11:23 PM
gavmer gavmer is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 3 gavmer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Delete command button in code

Hi all,

Can someone advise how to add to this code to delete the command button after the code runs??

CHeers!!

Private Sub CommandButton1_Click()
>'CopyData1 Range("C10:C37"), "BASE MACHINE"
>CopyData1 Range("C45:C115"), "OPTIONS INCLUDED"
>End Sub
>Private Sub CopyData1(rngC As Range, Target As String)
>Application.ScreenUpdating = False
>Dim rng As Range, cell As Range
>Dim rng1 As Range, rng2 As Range
>Dim rng3 As Range
>Dim nrow As Long, rw As Long
>Dim Sh As Worksheet
>nrow = Application.CountIf(rngC, ">0")
>If nrow = 0 Then Exit Sub
>Set Sh = Worksheets("sheet1")
>Set rng = Sh.Columns(1).Find(What:=Target, _
>After:=Sh.Range("A1"), _
>LookIn:=xlValues, _
>LookAt:=xlPart, _
>SearchOrder:=xlByRows, _
>SearchDirection:=xlNext, _
>MatchCase:=False)
>If rng Is Nothing Then
>MsgBox Target & " Not found"
>Exit Sub
>End If
>Set rng3 = rng
>Worksheets("sheet1").Unprotect Password:="jenjen1"
>rng.Offset(3, 0).ClearContents
>If Application.CountA(rng3) > 2 Then
>Else
>Set rng3 = rng.Offset(3, 0)
>End If
>rw = rng3.Row
>rng3.Resize(nrow * 2, 1).EntireRow.Insert
>For Each cell In rngC
>If Not IsEmpty(cell) Then
>If IsNumeric(cell) Then
>If cell > 0 Then
>Cells(cell.Row, 5).Copy
>Sh.Cells(rw, "c").PasteSpecial Paste:=xlPasteValues
>Cells(cell.Row, 2).Copy
>Sh.Cells(rw, "B").PasteSpecial Paste:=xlPasteValues
>rw = rw + 2
>End If
>End If
>End If
>Next
>Worksheets("sheet1").Protect Password:="jenjen1"
>End Sub

Reply With Quote
  #2  
Old October 20th, 2004, 06:28 PM
danielgraham danielgraham is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 6 danielgraham User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Pretty much the same as module and compiled dlls.

I dont think you can as it is fixed into the program when compiled. You can hide it though.


Soryy I could not be of any help

Daniel

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > Delete command button in code


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway