Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default Permission Denied: no write occuring [Excel2000]

I'm getting a very puzzling error on a form -
"Run Time error 70: Permission Denied"

There are no routines that write to file or registry in the entire project.
It always occurs in the same macro (it's listed in full below), on a
specific line:
frmManager.LstSetCurrent.List() = aCombatants

lstsetcurrent is a listbox on a form.
aCombatants is an array of variable size.

If anyone is willing to look over the spreadsheet I'm more than happy to
send it out. This is driving me up the wall!

Darren
---------------------
Sub FillSetList()
Dim CurrentSet As String
Dim RowIndex As Long
Dim ColumnIndex As Long
CurrentSet = "Set " & frmManager.TabStrip1.SelectedItem.index
iCountAll = Sheets("DataCombat").Range("A65536").End(xlUp).Row - 2
jCountAll = Application.CountA(Sheets("DataCombat").Range("1:1 ")) - 1
' fill the array with character names
' count how many instances of CurrentSet occur
jCount = Application.WorksheetFunction.CountIf( _
Sheets("DataCombat").Range("B1:B" & iCountAll + 2), CurrentSet)

If jCount = 0 Then GoTo Skip

ReDim aCombatants(jCount - 1, 4)
RowIndex = 0: ColumnIndex = 0
For iCount = 0 To iCountAll
If Sheets("DataCombat").Range("B" & iCount + 2).Value = CurrentSet
Then
ColumnIndex = 0
For jCount = 0 To 6
aCombatants(RowIndex, ColumnIndex) =
Sheets("DataCombat").Cells(iCount + 2, jCount + 1).Value
If jCount = 0 Then jCount = 2
ColumnIndex = ColumnIndex + 1
Next jCount
RowIndex = RowIndex + 1
End If

Next iCount

frmManager.LstSetCurrent.ColumnCount = 5
frmManager.LstSetCurrent.ColumnWidths = "72;48;48;72;48"
'##### The error occurs on the next line
frmManager.LstSetCurrent.List() = aCombatants
Exit Sub
Skip:
frmManager.LstSetCurrent.Clear
End Sub


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
2nd most frequently occuring value Singh Excel Discussion (Misc queries) 3 March 2nd 09 11:35 PM
why Excel2000 don't allow to write ldiaz Excel Discussion (Misc queries) 4 November 2nd 06 03:20 AM
Runtime error Permission Denied Todd Huttenstine[_2_] Excel Programming 1 December 29th 03 10:46 PM
Permission Denied Audrey Ng Excel Programming 1 October 1st 03 07:20 AM
Error Msg: Permission to use object denied A. Nguyen Excel Programming 4 July 14th 03 09:05 PM


All times are GMT +1. The time now is 05:49 PM.

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

About Us

"It's about Microsoft Excel"