ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Deleting VBA programs (https://www.excelbanter.com/excel-programming/348282-deleting-vba-programs.html)

paulrm906

Deleting VBA programs
 

HELLO
I am hoping that someone can help me with this problem. Well it all
started when I copied and pasted a small VBA program from the internet.
The VBA program was to stop anyone from copying or cutting and pasting
any of my work. However this VBA program went to all excel sheets and
now I cannot cut or copy by using the the left mouse or the cut/copy in
edit. I can however still cut and copy by using control+c/x. I have so
far deleted the VBA program plus I have deleted the excel program
itself and I have even deleted Microsoft Office and then reloaded it.
And still I have the same problem. I have also gone into VBA and I
cannot find any trace of the VBA program that I installed in the first
place. Plus I have checked all options in the tool bar. If I cannot
solve this in the end I will have to reload windows all together.
Thanks in advance if you can help me correct this problem.

Paul


--
paulrm906
------------------------------------------------------------------------
paulrm906's Profile: http://www.excelforum.com/member.php...o&userid=28776
View this thread: http://www.excelforum.com/showthread...hreadid=494064


Norman Jones

Deleting VBA programs
 
Hi Paul,

Try:

'=============
Sub Test()
Dim Ctl As CommandBarControl
Dim CBar As Long

On Error Resume Next
For CBar = 1 To Application.CommandBars.Count
For Each Ctl In Application.CommandBars(CBar).Controls
With Application.CommandBars(CBar)
.FindControl(ID:=19, Recursive:=True).Enabled = True
.FindControl(ID:=21, Recursive:=True).Enabled = True
.FindControl(ID:=22, Recursive:=True).Enabled = True
Next Ctl
Next CBar
On Error GoTo 0
End Sub
'<<=============

---
Regards,
Norman


"paulrm906" wrote
in message ...

HELLO
I am hoping that someone can help me with this problem. Well it all
started when I copied and pasted a small VBA program from the internet.
The VBA program was to stop anyone from copying or cutting and pasting
any of my work. However this VBA program went to all excel sheets and
now I cannot cut or copy by using the the left mouse or the cut/copy in
edit. I can however still cut and copy by using control+c/x. I have so
far deleted the VBA program plus I have deleted the excel program
itself and I have even deleted Microsoft Office and then reloaded it.
And still I have the same problem. I have also gone into VBA and I
cannot find any trace of the VBA program that I installed in the first
place. Plus I have checked all options in the tool bar. If I cannot
solve this in the end I will have to reload windows all together.
Thanks in advance if you can help me correct this problem.

Paul


--
paulrm906
------------------------------------------------------------------------
paulrm906's Profile:
http://www.excelforum.com/member.php...o&userid=28776
View this thread: http://www.excelforum.com/showthread...hreadid=494064




Dave Peterson

Deleting VBA programs
 
You have more replies at your other post.

paulrm906 wrote:

HELLO
I am hoping that someone can help me with this problem. Well it all
started when I copied and pasted a small VBA program from the internet.
The VBA program was to stop anyone from copying or cutting and pasting
any of my work. However this VBA program went to all excel sheets and
now I cannot cut or copy by using the the left mouse or the cut/copy in
edit. I can however still cut and copy by using control+c/x. I have so
far deleted the VBA program plus I have deleted the excel program
itself and I have even deleted Microsoft Office and then reloaded it.
And still I have the same problem. I have also gone into VBA and I
cannot find any trace of the VBA program that I installed in the first
place. Plus I have checked all options in the tool bar. If I cannot
solve this in the end I will have to reload windows all together.
Thanks in advance if you can help me correct this problem.

Paul

--
paulrm906
------------------------------------------------------------------------
paulrm906's Profile: http://www.excelforum.com/member.php...o&userid=28776
View this thread: http://www.excelforum.com/showthread...hreadid=494064


--

Dave Peterson

paulrm906

Deleting VBA programs
 

Hello Norman

Thanks for your help but sorry to have to inform you it did not help
me.

Thanks Again

PaUL Maynard:)

Norman Jones Wrote:
Hi Paul,

Try:

'=============
Sub Test()
Dim Ctl As CommandBarControl
Dim CBar As Long

On Error Resume Next
For CBar = 1 To Application.CommandBars.Count
For Each Ctl In Application.CommandBars(CBar).Controls
With Application.CommandBars(CBar)
.FindControl(ID:=19, Recursive:=True).Enabled = True
.FindControl(ID:=21, Recursive:=True).Enabled = True
.FindControl(ID:=22, Recursive:=True).Enabled = True
Next Ctl
Next CBar
On Error GoTo 0
End Sub
'<<=============

---
Regards,
Norman


"paulrm906"
wrote
in message
...

HELLO
I am hoping that someone can help me with this problem. Well it all
started when I copied and pasted a small VBA program from the

internet.
The VBA program was to stop anyone from copying or cutting and

pasting
any of my work. However this VBA program went to all excel sheets

and
now I cannot cut or copy by using the the left mouse or the cut/copy

in
edit. I can however still cut and copy by using control+c/x. I have

so
far deleted the VBA program plus I have deleted the excel program
itself and I have even deleted Microsoft Office and then reloaded

it.
And still I have the same problem. I have also gone into VBA and I
cannot find any trace of the VBA program that I installed in the

first
place. Plus I have checked all options in the tool bar. If I cannot
solve this in the end I will have to reload windows all together.
Thanks in advance if you can help me correct this problem.

Paul


--
paulrm906

------------------------------------------------------------------------
paulrm906's Profile:
http://www.excelforum.com/member.php...o&userid=28776
View this thread:

http://www.excelforum.com/showthread...hreadid=494064



--
paulrm906
------------------------------------------------------------------------
paulrm906's Profile: http://www.excelforum.com/member.php...o&userid=28776
View this thread: http://www.excelforum.com/showthread...hreadid=494064


Peter T

Deleting VBA programs
 
Hi Paul,

First thing - Re-installing Excel, Office or even Windows won't solve your
problem
Second thing - don't panic!

Looks like something went astray when Norman's pasted his code, try

Sub Test2()
Dim Ctl As CommandBarControl
Dim CBar As Long

On Error Resume Next
For CBar = 1 To Application.CommandBars.Count
With Application.CommandBars(CBar)
For Each Ctl In .Controls
.FindControl(ID:=19, Recursive:=True).Enabled = True
.FindControl(ID:=21, Recursive:=True).Enabled = True
.FindControl(ID:=22, Recursive:=True).Enabled = True
Next Ctl
End With
Next CBar
On Error GoTo 0
End Sub

However I imagine you would already have picked this up as the code could
not have run.

If your original code actually deleted the controls even this might not
work.

Close Excel and search your folders for your Excel toolbars file. Exact name
and location is version dependant so search its extension *.xlb

Rename the extension .old

Re-start Excel and it will create new default set of toolbars and create a
new *.xlb file (when you next close Excel). You will loose previously
customised toolbars. If that's a pain post the code that caused all your
problems, maybe it can be reversed over your original customised toolbars.

Regards,
Peter T

"paulrm906" wrote
in message ...

Hello Norman

Thanks for your help but sorry to have to inform you it did not help
me.

Thanks Again

PaUL Maynard:)

Norman Jones Wrote:
Hi Paul,

Try:

'=============
Sub Test()
Dim Ctl As CommandBarControl
Dim CBar As Long

On Error Resume Next
For CBar = 1 To Application.CommandBars.Count
For Each Ctl In Application.CommandBars(CBar).Controls
With Application.CommandBars(CBar)
.FindControl(ID:=19, Recursive:=True).Enabled = True
.FindControl(ID:=21, Recursive:=True).Enabled = True
.FindControl(ID:=22, Recursive:=True).Enabled = True
Next Ctl
Next CBar
On Error GoTo 0
End Sub
'<<=============

---
Regards,
Norman


"paulrm906"
wrote
in message
...

HELLO
I am hoping that someone can help me with this problem. Well it all
started when I copied and pasted a small VBA program from the

internet.
The VBA program was to stop anyone from copying or cutting and

pasting
any of my work. However this VBA program went to all excel sheets

and
now I cannot cut or copy by using the the left mouse or the cut/copy

in
edit. I can however still cut and copy by using control+c/x. I have

so
far deleted the VBA program plus I have deleted the excel program
itself and I have even deleted Microsoft Office and then reloaded

it.
And still I have the same problem. I have also gone into VBA and I
cannot find any trace of the VBA program that I installed in the

first
place. Plus I have checked all options in the tool bar. If I cannot
solve this in the end I will have to reload windows all together.
Thanks in advance if you can help me correct this problem.

Paul


--
paulrm906

------------------------------------------------------------------------
paulrm906's Profile:
http://www.excelforum.com/member.php...o&userid=28776
View this thread:

http://www.excelforum.com/showthread...hreadid=494064



--
paulrm906
------------------------------------------------------------------------
paulrm906's Profile:

http://www.excelforum.com/member.php...o&userid=28776
View this thread: http://www.excelforum.com/showthread...hreadid=494064




Norman Jones

Deleting VBA programs
 
Hi Peter,

Looks like something went astray when Norman's pasted his code


Thank you for the catch. That was very sloppy!


---
Regards,
Norman



"Peter T" <peter_t@discussions wrote in message
...
Hi Paul,

First thing - Re-installing Excel, Office or even Windows won't solve your
problem
Second thing - don't panic!

Looks like something went astray when Norman's pasted his code, try

Sub Test2()
Dim Ctl As CommandBarControl
Dim CBar As Long

On Error Resume Next
For CBar = 1 To Application.CommandBars.Count
With Application.CommandBars(CBar)
For Each Ctl In .Controls
.FindControl(ID:=19, Recursive:=True).Enabled = True
.FindControl(ID:=21, Recursive:=True).Enabled = True
.FindControl(ID:=22, Recursive:=True).Enabled = True
Next Ctl
End With
Next CBar
On Error GoTo 0
End Sub

However I imagine you would already have picked this up as the code could
not have run.

If your original code actually deleted the controls even this might not
work.

Close Excel and search your folders for your Excel toolbars file. Exact
name
and location is version dependant so search its extension *.xlb

Rename the extension .old

Re-start Excel and it will create new default set of toolbars and create a
new *.xlb file (when you next close Excel). You will loose previously
customised toolbars. If that's a pain post the code that caused all your
problems, maybe it can be reversed over your original customised toolbars.

Regards,
Peter T

"paulrm906" wrote
in message ...

Hello Norman

Thanks for your help but sorry to have to inform you it did not help
me.

Thanks Again

PaUL Maynard:)

Norman Jones Wrote:
Hi Paul,

Try:

'=============
Sub Test()
Dim Ctl As CommandBarControl
Dim CBar As Long

On Error Resume Next
For CBar = 1 To Application.CommandBars.Count
For Each Ctl In Application.CommandBars(CBar).Controls
With Application.CommandBars(CBar)
.FindControl(ID:=19, Recursive:=True).Enabled = True
.FindControl(ID:=21, Recursive:=True).Enabled = True
.FindControl(ID:=22, Recursive:=True).Enabled = True
Next Ctl
Next CBar
On Error GoTo 0
End Sub
'<<=============

---
Regards,
Norman


"paulrm906"
wrote
in message
...

HELLO
I am hoping that someone can help me with this problem. Well it all
started when I copied and pasted a small VBA program from the
internet.
The VBA program was to stop anyone from copying or cutting and
pasting
any of my work. However this VBA program went to all excel sheets
and
now I cannot cut or copy by using the the left mouse or the cut/copy
in
edit. I can however still cut and copy by using control+c/x. I have
so
far deleted the VBA program plus I have deleted the excel program
itself and I have even deleted Microsoft Office and then reloaded
it.
And still I have the same problem. I have also gone into VBA and I
cannot find any trace of the VBA program that I installed in the
first
place. Plus I have checked all options in the tool bar. If I cannot
solve this in the end I will have to reload windows all together.
Thanks in advance if you can help me correct this problem.

Paul


--
paulrm906

------------------------------------------------------------------------
paulrm906's Profile:
http://www.excelforum.com/member.php...o&userid=28776
View this thread:
http://www.excelforum.com/showthread...hreadid=494064



--
paulrm906
------------------------------------------------------------------------
paulrm906's Profile:

http://www.excelforum.com/member.php...o&userid=28776
View this thread:
http://www.excelforum.com/showthread...hreadid=494064







All times are GMT +1. The time now is 03:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com