Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default errrors while trying to delete a commandbutton


hi

I have a commandbutton placed on a sheet call "Information" the
Commandbuttons Name is Updater.

i have the following piece of code

Private Sub updater_Click()
Range("a1").Activate
Sheets("information").Updater.Delete
End Sub

however it does not seem to work? The purpose of the commandbutton is
to run a once off macro.


--
funkymonkUK
------------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...o&userid=18135
View this thread: http://www.excelforum.com/showthread...hreadid=555947

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default errrors while trying to delete a commandbutton


sorry i am having troubles with the code.

I have the following

Private Sub updater_Click()
Range("a1").Activate
Sheets("Information").OLEObjects("updater").Delete
End Sub

and am getting a Runtime 1004 : Application-Defined or object-define
error.

i have no idea why this could be happening

--
funkymonkU
-----------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...fo&userid=1813
View this thread: http://www.excelforum.com/showthread.php?threadid=55594

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default errrors while trying to delete a commandbutton

You code works for me in Excel 2003. Ensure that the sheet is not
protected.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"funkymonkUK"
wrote
in message
...

sorry i am having troubles with the code.

I have the following

Private Sub updater_Click()
Range("a1").Activate
Sheets("Information").OLEObjects("updater").Delete
End Sub

and am getting a Runtime 1004 : Application-Defined or
object-defined
error.

i have no idea why this could be happening.


--
funkymonkUK
------------------------------------------------------------------------
funkymonkUK's Profile:
http://www.excelforum.com/member.php...o&userid=18135
View this thread:
http://www.excelforum.com/showthread...hreadid=555947



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default errrors while trying to delete a commandbutton


yeah sorry it was password Protected works like a treat

--
funkymonkU
-----------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...fo&userid=1813
View this thread: http://www.excelforum.com/showthread.php?threadid=55594



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default errrors while trying to delete a commandbutton


sorry i am having troubles with the code.

I have the following

Private Sub updater_Click()
Range("a1").Activate
Sheets("Information").OLEObjects("updater").Delete
End Sub

and am getting a Runtime 1004 : Application-Defined or object-define
error.

i have no idea why this could be happening

--
funkymonkU
-----------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...fo&userid=1813
View this thread: http://www.excelforum.com/showthread.php?threadid=55594

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default errrors while trying to delete a commandbutton

Your code worked for me in Excel 2002.

Mark


funkymonkUK wrote:
sorry i am having troubles with the code.

I have the following

Private Sub updater_Click()
Range("a1").Activate
Sheets("Information").OLEObjects("updater").Delete
End Sub

and am getting a Runtime 1004 : Application-Defined or object-defined
error.

i have no idea why this could be happening.


--
funkymonkUK
------------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...o&userid=18135
View this thread: http://www.excelforum.com/showthread...hreadid=555947


  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default errrors while trying to delete a commandbutton


i have excel 2000 if that helps


--
funkymonkUK
------------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...o&userid=18135
View this thread: http://www.excelforum.com/showthread...hreadid=555947

  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default errrors while trying to delete a commandbutton


i have excel 2000 if that helps


--
funkymonkUK
------------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...o&userid=18135
View this thread: http://www.excelforum.com/showthread...hreadid=555947



  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default errrors while trying to delete a commandbutton


sorry i am having troubles with the code.

I have the following

Private Sub updater_Click()
Range("a1").Activate
Sheets("Information").OLEObjects("updater").Delete
End Sub

and am getting a Runtime 1004 : Application-Defined or object-define
error.

i have no idea why this could be happening

--
funkymonkU
-----------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...fo&userid=1813
View this thread: http://www.excelforum.com/showthread.php?threadid=55594

  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default errrors while trying to delete a commandbutton


sorry i am having troubles with the code.

I have the following

Private Sub updater_Click()
Range("a1").Activate
Sheets("Information").OLEObjects("updater").Delete
End Sub

and am getting a Runtime 1004 : Application-Defined or object-define
error.

i have no idea why this could be happening

--
funkymonkU
-----------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...fo&userid=1813
View this thread: http://www.excelforum.com/showthread.php?threadid=55594

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete Forms CommandButton on Worksheet Jim May Excel Discussion (Misc queries) 7 June 5th 06 10:29 PM
Commandbutton alvin Kuiper Excel Programming 6 November 27th 05 06:28 PM
Delete a Commandbutton from another Workbook jase[_2_] Excel Programming 5 June 3rd 05 03:15 PM
CommandButton rwebster3 Excel Programming 0 April 14th 04 08:16 PM
Commandbutton David Fixemer Excel Programming 2 February 25th 04 10:18 PM


All times are GMT +1. The time now is 07:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"