ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Opening a csv file stops macro (https://www.excelbanter.com/excel-programming/405436-opening-csv-file-stops-macro.html)

Prema

Opening a csv file stops macro
 
In vb I have code to open a csv file. After opening the file "YY" is entered
in cell A1 and macro stops. But if I introduce a breakpoint at open file
statement code and step it thru Mcro continues OK. I have no idea where "YY"
is coming from. Can anyone say how this can be resolved without having to set
break point and step thru as this will be used by end users who will find it
confusing.

Thank you

FSt1

Opening a csv file stops macro
 
hi
posting your code might be helpful.

Regards
FSt1

"Prema" wrote:

In vb I have code to open a csv file. After opening the file "YY" is entered
in cell A1 and macro stops. But if I introduce a breakpoint at open file
statement code and step it thru Mcro continues OK. I have no idea where "YY"
is coming from. Can anyone say how this can be resolved without having to set
break point and step thru as this will be used by end users who will find it
confusing.

Thank you


Dave Peterson

Opening a csv file stops macro
 
How do you start your macro?

Do you use a shortcut key? Does that shortcut key include the shiftkey?

Does the problem go away if you drop the shift from the shortcut key
combination?

If you have a workbook that has a workbook_open event or an auto_open procedure,
then if you open that file with the shift key held down, you stop those
procedures from running.

The shift-key in the shortcut combination confuses excel/vba to stop after you
open a file using one of those shortcut keys.


Prema wrote:

In vb I have code to open a csv file. After opening the file "YY" is entered
in cell A1 and macro stops. But if I introduce a breakpoint at open file
statement code and step it thru Mcro continues OK. I have no idea where "YY"
is coming from. Can anyone say how this can be resolved without having to set
break point and step thru as this will be used by end users who will find it
confusing.

Thank you


--

Dave Peterson

Prema

Opening a csv file stops macro
 
Macro is started by pressing a button on the workbook. it opens many files
but this is the only one it seem to be hanging. It used to work OK before but
suddenly started this problem. This file is saved from a third party website.
Could any changes in the properties of the file cause the problem?

Prema

"Dave Peterson" wrote:

How do you start your macro?

Do you use a shortcut key? Does that shortcut key include the shiftkey?

Does the problem go away if you drop the shift from the shortcut key
combination?

If you have a workbook that has a workbook_open event or an auto_open procedure,
then if you open that file with the shift key held down, you stop those
procedures from running.

The shift-key in the shortcut combination confuses excel/vba to stop after you
open a file using one of those shortcut keys.


Prema wrote:

In vb I have code to open a csv file. After opening the file "YY" is entered
in cell A1 and macro stops. But if I introduce a breakpoint at open file
statement code and step it thru Mcro continues OK. I have no idea where "YY"
is coming from. Can anyone say how this can be resolved without having to set
break point and step thru as this will be used by end users who will find it
confusing.

Thank you


--

Dave Peterson


Nigel[_2_]

Opening a csv file stops macro
 
You bet! I would start looking at the file you are trying to load first.
Normally whenever I hear "Well it was working OK, then it just stopped" it
more often than not is something outside of your control, a third party file
is highly likely to be the culprit.

--

Regards,
Nigel




"Prema" wrote in message
...
Macro is started by pressing a button on the workbook. it opens many files
but this is the only one it seem to be hanging. It used to work OK before
but
suddenly started this problem. This file is saved from a third party
website.
Could any changes in the properties of the file cause the problem?

Prema

"Dave Peterson" wrote:

How do you start your macro?

Do you use a shortcut key? Does that shortcut key include the shiftkey?

Does the problem go away if you drop the shift from the shortcut key
combination?

If you have a workbook that has a workbook_open event or an auto_open
procedure,
then if you open that file with the shift key held down, you stop those
procedures from running.

The shift-key in the shortcut combination confuses excel/vba to stop
after you
open a file using one of those shortcut keys.


Prema wrote:

In vb I have code to open a csv file. After opening the file "YY" is
entered
in cell A1 and macro stops. But if I introduce a breakpoint at open
file
statement code and step it thru Mcro continues OK. I have no idea where
"YY"
is coming from. Can anyone say how this can be resolved without having
to set
break point and step thru as this will be used by end users who will
find it
confusing.

Thank you


--

Dave Peterson




All times are GMT +1. The time now is 12:09 PM.

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