View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Personal macro csv file

Before you do anything, make your file the way you normally do.
Add the macro. Save the file. Close excel.
Re-open excel. Reopen your file.
Do you still see you code in that workbook's module?

If you don't see that module, then something is going wrong--I'd guess that
you're not saving the file as a normal workbook (*.xls). You may be saving it
as a .csv and those .csv files are just plain old text files.

But since those plain old .csv files are "owned" by excel, they can still be
called excel files. (The lingo can be confusing.)

On the other hand, if you do see your module in the project, then you're doing
fine.

Maybe you can change the code so that it doesn't depend on the name of the
worksheet.

You may be able to do everything without naming a range (just use range object
variables).

Or your code could rely on the activesheet.

with activesheet
'for a global/workbook name
.range("A1:X99").name = "SomeNameHere"

'for a local/worksheet level name
.range("a1:x99").name = "'" & .name & "'!SomeNameHere"
end with




"BNT1 via OfficeKB.com" wrote:

Hi

I have misunderstood, and it is an excel file. When generating the report,
from AS400 system tne file is an attachement and a sheet name is allocated
each time it is run, ie, `OASISCSV(48). then next time `OASISCSV(49) etc.
This stopped the macro running owing to the sheet name when i defined a range.
It does run if i amend the sheet name to sheet1.
Is there an way of giving it any wild cards etc, say OASISCSV**** or
something, in the macro, to prevent it looking for the sheet1. Also the
shortkut cut does not operate, but selecting from tools/macro does?

All help is appriciated

Brian

BNT1 wrote:
it has excel in the top right hand corner
will take another look at when at work in the morning and try and get more
info

regards

There are no modules in a CSV file so can't tell what you're doing.

[quoted text clipped - 5 lines]

Brian


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200910/1


--

Dave Peterson