Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default vba project stopped working in excel 2003

I had created a VBA enabled workbook for our auditors to generate random
sample numbers in the field.

Recently two have suddenly been unable to use it. It used to work for them,
but now the project on thier computers fails to read the numbers in the cell
refrences.

I could find nothing in the knowledge base about this problem.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default vba project stopped working in excel 2003

Sorry, here is the code snippet for the first section that breaks. The other
sections after use the same reference style.

intTotal = Application.Workbooks(1).Worksheets(1).Range("B9") .Value
' check that there is a value givin for sample size
If intTotal = 0 Or intTotal 200 Then
intMsg = MsgBox("Incorrect values entered for sample size. Please
enter a value between 1 and 200.", vbOKOnly, "Error: Incorrect Data")
Exit Sub
End If

"Don Guillett" wrote:

As always, post your code for comments.

--
Don Guillett
SalesAid Software

"MortVent" wrote in message
...
I had created a VBA enabled workbook for our auditors to generate random
sample numbers in the field.

Recently two have suddenly been unable to use it. It used to work for

them,
but now the project on thier computers fails to read the numbers in the

cell
refrences.

I could find nothing in the knowledge base about this problem.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default vba project stopped working in excel 2003

What's in Application.Workbooks(1).Worksheets(1).Range("B9") .Value?

Are you sure workbooks(1) is the correct workbook? Maybe they have multiple
workbooks open?

Maybe someone moved worksheets around on you???

You could add this line while you're debugging:

msgbox _
Application.Workbooks(1).Worksheets(1).Range("B9") .address(external:=true)





MortVent wrote:

Sorry, here is the code snippet for the first section that breaks. The other
sections after use the same reference style.

intTotal = Application.Workbooks(1).Worksheets(1).Range("B9") .Value
' check that there is a value givin for sample size
If intTotal = 0 Or intTotal 200 Then
intMsg = MsgBox("Incorrect values entered for sample size. Please
enter a value between 1 and 200.", vbOKOnly, "Error: Incorrect Data")
Exit Sub
End If

"Don Guillett" wrote:

As always, post your code for comments.

--
Don Guillett
SalesAid Software

"MortVent" wrote in message
...
I had created a VBA enabled workbook for our auditors to generate random
sample numbers in the field.

Recently two have suddenly been unable to use it. It used to work for

them,
but now the project on thier computers fails to read the numbers in the

cell
refrences.

I could find nothing in the knowledge base about this problem.





--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default vba project stopped working in excel 2003

It was the only workbook open in testing. It should be anumber. I tried it
with values within the acceptable ranges. It is like the application just
stopped accepting the references.

All cells referenced had correct values, and it treted them as having
incorrect values or empty cells.

Odd thing is the auditors were using the workbook fine, then it just stopped
working.

"Dave Peterson" wrote:

What's in Application.Workbooks(1).Worksheets(1).Range("B9") .Value?

Are you sure workbooks(1) is the correct workbook? Maybe they have multiple
workbooks open?

Maybe someone moved worksheets around on you???

You could add this line while you're debugging:

msgbox _
Application.Workbooks(1).Worksheets(1).Range("B9") .address(external:=true)





MortVent wrote:

Sorry, here is the code snippet for the first section that breaks. The other
sections after use the same reference style.

intTotal = Application.Workbooks(1).Worksheets(1).Range("B9") .Value
' check that there is a value givin for sample size
If intTotal = 0 Or intTotal 200 Then
intMsg = MsgBox("Incorrect values entered for sample size. Please
enter a value between 1 and 200.", vbOKOnly, "Error: Incorrect Data")
Exit Sub
End If

"Don Guillett" wrote:

As always, post your code for comments.

--
Don Guillett
SalesAid Software

"MortVent" wrote in message
...
I had created a VBA enabled workbook for our auditors to generate random
sample numbers in the field.

Recently two have suddenly been unable to use it. It used to work for
them,
but now the project on thier computers fails to read the numbers in the
cell
refrences.

I could find nothing in the knowledge base about this problem.




--

Dave Peterson



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default vba project stopped working in excel 2003

Well it turns out they have personal macro workbooks in excel startup. And
I'll try doing a fixed index on the name.

"MortVent" wrote:

It was the only workbook open in testing. It should be anumber. I tried it
with values within the acceptable ranges. It is like the application just
stopped accepting the references.

All cells referenced had correct values, and it treted them as having
incorrect values or empty cells.

Odd thing is the auditors were using the workbook fine, then it just stopped
working.

"Dave Peterson" wrote:

What's in Application.Workbooks(1).Worksheets(1).Range("B9") .Value?

Are you sure workbooks(1) is the correct workbook? Maybe they have multiple
workbooks open?

Maybe someone moved worksheets around on you???

You could add this line while you're debugging:

msgbox _
Application.Workbooks(1).Worksheets(1).Range("B9") .address(external:=true)





MortVent wrote:

Sorry, here is the code snippet for the first section that breaks. The other
sections after use the same reference style.

intTotal = Application.Workbooks(1).Worksheets(1).Range("B9") .Value
' check that there is a value givin for sample size
If intTotal = 0 Or intTotal 200 Then
intMsg = MsgBox("Incorrect values entered for sample size. Please
enter a value between 1 and 200.", vbOKOnly, "Error: Incorrect Data")
Exit Sub
End If

"Don Guillett" wrote:

As always, post your code for comments.

--
Don Guillett
SalesAid Software

"MortVent" wrote in message
...
I had created a VBA enabled workbook for our auditors to generate random
sample numbers in the field.

Recently two have suddenly been unable to use it. It used to work for
them,
but now the project on thier computers fails to read the numbers in the
cell
refrences.

I could find nothing in the knowledge base about this problem.




--

Dave Peterson

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default vba project stopped working in excel 2003

If you know the name, maybe you could just use that:

intTotal = Application.Workbooks("myworkbooknamehere.xls") _
.Worksheets("myworksheetnamehere.xls").Range("B9") .Value

(and use the worksheet name, too, if you know it.)



MortVent wrote:

Well it turns out they have personal macro workbooks in excel startup. And
I'll try doing a fixed index on the name.

"MortVent" wrote:

It was the only workbook open in testing. It should be anumber. I tried it
with values within the acceptable ranges. It is like the application just
stopped accepting the references.

All cells referenced had correct values, and it treted them as having
incorrect values or empty cells.

Odd thing is the auditors were using the workbook fine, then it just stopped
working.

"Dave Peterson" wrote:

What's in Application.Workbooks(1).Worksheets(1).Range("B9") .Value?

Are you sure workbooks(1) is the correct workbook? Maybe they have multiple
workbooks open?

Maybe someone moved worksheets around on you???

You could add this line while you're debugging:

msgbox _
Application.Workbooks(1).Worksheets(1).Range("B9") .address(external:=true)





MortVent wrote:

Sorry, here is the code snippet for the first section that breaks. The other
sections after use the same reference style.

intTotal = Application.Workbooks(1).Worksheets(1).Range("B9") .Value
' check that there is a value givin for sample size
If intTotal = 0 Or intTotal 200 Then
intMsg = MsgBox("Incorrect values entered for sample size. Please
enter a value between 1 and 200.", vbOKOnly, "Error: Incorrect Data")
Exit Sub
End If

"Don Guillett" wrote:

As always, post your code for comments.

--
Don Guillett
SalesAid Software

"MortVent" wrote in message
...
I had created a VBA enabled workbook for our auditors to generate random
sample numbers in the field.

Recently two have suddenly been unable to use it. It used to work for
them,
but now the project on thier computers fails to read the numbers in the
cell
refrences.

I could find nothing in the knowledge base about this problem.




--

Dave Peterson


--

Dave Peterson
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default vba project stopped working in excel 2003

I wound up just using ThisWorkbook instead of Application.Workbooks(index)


"Dave Peterson" wrote:

If you know the name, maybe you could just use that:

intTotal = Application.Workbooks("myworkbooknamehere.xls") _
.Worksheets("myworksheetnamehere.xls").Range("B9") .Value

(and use the worksheet name, too, if you know it.)



MortVent wrote:

Well it turns out they have personal macro workbooks in excel startup. And
I'll try doing a fixed index on the name.

"MortVent" wrote:

It was the only workbook open in testing. It should be anumber. I tried it
with values within the acceptable ranges. It is like the application just
stopped accepting the references.

All cells referenced had correct values, and it treted them as having
incorrect values or empty cells.

Odd thing is the auditors were using the workbook fine, then it just stopped
working.

"Dave Peterson" wrote:

What's in Application.Workbooks(1).Worksheets(1).Range("B9") .Value?

Are you sure workbooks(1) is the correct workbook? Maybe they have multiple
workbooks open?

Maybe someone moved worksheets around on you???

You could add this line while you're debugging:

msgbox _
Application.Workbooks(1).Worksheets(1).Range("B9") .address(external:=true)





MortVent wrote:

Sorry, here is the code snippet for the first section that breaks. The other
sections after use the same reference style.

intTotal = Application.Workbooks(1).Worksheets(1).Range("B9") .Value
' check that there is a value givin for sample size
If intTotal = 0 Or intTotal 200 Then
intMsg = MsgBox("Incorrect values entered for sample size. Please
enter a value between 1 and 200.", vbOKOnly, "Error: Incorrect Data")
Exit Sub
End If

"Don Guillett" wrote:

As always, post your code for comments.

--
Don Guillett
SalesAid Software

"MortVent" wrote in message
...
I had created a VBA enabled workbook for our auditors to generate random
sample numbers in the field.

Recently two have suddenly been unable to use it. It used to work for
them,
but now the project on thier computers fails to read the numbers in the
cell
refrences.

I could find nothing in the knowledge base about this problem.




--

Dave Peterson


--

Dave Peterson

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default vba project stopped working in excel 2003

Much more specific!

MortVent wrote:

I wound up just using ThisWorkbook instead of Application.Workbooks(index)

"Dave Peterson" wrote:

If you know the name, maybe you could just use that:

intTotal = Application.Workbooks("myworkbooknamehere.xls") _
.Worksheets("myworksheetnamehere.xls").Range("B9") .Value

(and use the worksheet name, too, if you know it.)



MortVent wrote:

Well it turns out they have personal macro workbooks in excel startup. And
I'll try doing a fixed index on the name.

"MortVent" wrote:

It was the only workbook open in testing. It should be anumber. I tried it
with values within the acceptable ranges. It is like the application just
stopped accepting the references.

All cells referenced had correct values, and it treted them as having
incorrect values or empty cells.

Odd thing is the auditors were using the workbook fine, then it just stopped
working.

"Dave Peterson" wrote:

What's in Application.Workbooks(1).Worksheets(1).Range("B9") .Value?

Are you sure workbooks(1) is the correct workbook? Maybe they have multiple
workbooks open?

Maybe someone moved worksheets around on you???

You could add this line while you're debugging:

msgbox _
Application.Workbooks(1).Worksheets(1).Range("B9") .address(external:=true)





MortVent wrote:

Sorry, here is the code snippet for the first section that breaks. The other
sections after use the same reference style.

intTotal = Application.Workbooks(1).Worksheets(1).Range("B9") .Value
' check that there is a value givin for sample size
If intTotal = 0 Or intTotal 200 Then
intMsg = MsgBox("Incorrect values entered for sample size. Please
enter a value between 1 and 200.", vbOKOnly, "Error: Incorrect Data")
Exit Sub
End If

"Don Guillett" wrote:

As always, post your code for comments.

--
Don Guillett
SalesAid Software

"MortVent" wrote in message
...
I had created a VBA enabled workbook for our auditors to generate random
sample numbers in the field.

Recently two have suddenly been unable to use it. It used to work for
them,
but now the project on thier computers fails to read the numbers in the
cell
refrences.

I could find nothing in the knowledge base about this problem.




--

Dave Peterson


--

Dave Peterson


--

Dave Peterson
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
Microsoft office excel 2003 has stopped working Veeshal Excel Discussion (Misc queries) 3 September 24th 09 07:30 PM
Excel 2003 Simply Stopped Working Tracie Excel Worksheet Functions 1 March 30th 06 04:08 AM
Edit / Move or copy sheet stopped working in Excel 2003 kris2u Excel Worksheet Functions 0 October 4th 05 08:20 PM
Hyperlinks stopped working in Excel 2003 Pilot Excel Discussion (Misc queries) 3 September 17th 05 06:18 AM
excel 97 stopped working john f Excel Worksheet Functions 1 April 13th 05 11:52 PM


All times are GMT +1. The time now is 03:54 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"