insufficient disk space when running macro

stephfr

New Member
Joined
Aug 17, 2011
Messages
39
I have a strange problem....

When I run a macro on my mac or on my work PC, it works perfectly well. However, when the guy who I wrote the macro for, runs it on his PC, excel closes with an error (in french so the translation may not be perfect) saying insufficient battery. I have no idea why..

This is my macro

Private Sub Worksheet_Change(ByVal Target As Range)

Dim KeyCellCaps As Range
Dim KeyCellNom As Range
Dim KeyCellMedia As Range
Dim KeyCellPrenom As Range
Dim KeyCellVille As Range
Dim KeyCellPostale As Range
Dim KeyCellTel As Range
Dim KeyCellFax As Range

Set KeyCellCaps = Range("A:A")
Set KeyCellNom = Range("A:A")
Set KeyCellPrenom = Range("B:B")
Set KeyCellMedia = Range("C:C")
Set KeyCellPostale = Range("E:E")
Set KeyCellVille = Range("F:F")
Set KeyCellTel = Range("G:G")
Set KeyCellFax = Range("H:H")

Column = "Q"


' Mettre le nom en majuscule et rajouter la date d'ajout

If Not Application.Intersect(KeyCellCaps, Range(Target.Address)) _
Is Nothing Then
If Target.Count > 1 Then Exit Sub

Target.Value = UCase(Target.Text)
Intcolumn = Target.Column
introw = Target.Row
Cells(introw, Column) = Now()

End If

' si le prénom est rajouté ou modifié, rajouter la date d'ajout

If Not Application.Intersect(KeyCellPrenom, Range(Target.Address)) _
Is Nothing Then


Prenom = Target.Text
P = Left(Prenom, 1)
P = UCase(P)
Renom = Mid(Prenom, 2)
Prenom = P & Renom
Target.Value = Prenom

Intcolumn = Target.Column
introw = Target.Row
Cells(introw, Column) = Now()
End If

' si le champ Médias est rajouté ou modifié, rajouter la date d'ajout

If Not Application.Intersect(KeyCellMedia, Range(Target.Address)) _
Is Nothing Then


Intcolumn = Target.Column
introw = Target.Row
Cells(introw, Column) = Now()
End If

'Convertir le code postale
If Not Application.Intersect(KeyCellPostale, Range(Target.Address)) _
Is Nothing Then

v = [{"&",1;"é",2;"""",3;"'",4;"(",5;"§",6;"è",7;"!",8;"ç",9;"à",0}]

s = Target.Value
For j = 1 To 10
s = Replace(s, v(j, 1), v(j, 2))
Next j

Application.EnableEvents = False
Range(Target.Address) = s
Application.EnableEvents = True
End If


'Convertir le numéro de téléphone

If Not Application.Intersect(KeyCellTel, Range(Target.Address)) _
Is Nothing Then

v = [{"&",1;"é",2;"""",3;"'",4;"(",5;"§",6;"è",7;"!",8;"ç",9;"à",0}]
s = Target.Value
For j = 1 To 10
s = Replace(s, v(j, 1), v(j, 2))
Next j

Application.EnableEvents = False
Range(Target.Address) = s
Application.EnableEvents = True
End If

'Convertir le numéro de fax
If Not Application.Intersect(KeyCellFax, Range(Target.Address)) _
Is Nothing Then

v = [{"&",1;"é",2;"""",3;"'",4;"(",5;"§",6;"è",7;"!",8;"ç",9;"à",0}]
s = Target.Value
For j = 1 To 10
s = Replace(s, v(j, 1), v(j, 2))
Next j

Application.EnableEvents = False
Range(Target.Address) = s
Application.EnableEvents = True
End If

' Mettre le nom de la ville en majuscules

If Not Application.Intersect(KeyCellVille, Range(Target.Address)) _
Is Nothing Then
Target.Value = UCase(Target.Text)
End If
End Sub

Anyone have any ideas? (does it work for you?)
Basically what it does is this:
Rows A & F - Convert the text to UpperCase
Row B - Convert the text to ProperCase
Rows E,G & H - Converts numbers entered on a french keyboard without the shift key having being pressed into numbers.

Thanks
Steph

PS, the error says:
Erreur d'exécution
Espace Pile insuffisant
(pile is actually battery but I'm guessing it means insufficient disk space)
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Hi Leith

Thank you :) How come he has the problem and I don't? we both have the same mac and the same version of Office?

I don't see anything in my code that would cause a stack overflow either :(

Steph
 
Upvote 0
I think I found the problem.... He didn't uninstall Office 2008. So now he has both 2008 and 2011 installed on his mac. Hopefully by removing 2008, deleting Excel 2011 and reinstalling that last one, it should fix the problem.
 
Upvote 0
Hello stephfr,

I don't think I ever would have thought to asked that question. Thanks for sharing your insight on the problem.
 
Upvote 0
Hi Leith

Uninstalled office 2008 on his mac and reinstalled Excel 2011 but it still doesn't work :'(

Steph
 
Upvote 0
Hello stephfr,

I am not a Mac office person but I know someone here here who is - Mike Erickson. I'll contact him and see if he has any ideas.
 
Upvote 0
Hello stephfr,

I contacted Mike by private message. Hopefully, he will be able to help on this problem.
 
Upvote 0
I notice that there are Changes being made to the sheet without Application.EnableEvents being disabled. As in this section

Code:
If Not Application.Intersect(KeyCellPrenom, Range(Target.Address)) _
Is Nothing Then

    Prenom = Target.Text
    P = Left(Prenom, 1)
    P = UCase(P)
    Renom = Mid(Prenom, 2)
    Prenom = P & Renom
    Target.Value = Prenom: rem note this line

    Intcolumn = Target.Column
    introw = Target.Row
    Cells(introw, Column) = Now(): rem doesn't this make that line irrelevant
End If
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,291
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top