Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 735
Default 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




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
Opening a file stops a Macro Bob Myers Excel Worksheet Functions 2 January 8th 08 11:50 PM
Formula stops working after re-opening worksheet watchtower Excel Worksheet Functions 2 November 20th 06 09:11 PM
File opening via Macro with varying file name TomFish79 Excel Programming 3 August 15th 05 02:32 PM
Macro stops running after file has moved LWhite Excel Programming 1 January 4th 05 07:44 PM


All times are GMT +1. The time now is 07:31 AM.

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

About Us

"It's about Microsoft Excel"