Macro Issue - Cannot Update

Moxioron

Active Member
Joined
Mar 17, 2008
Messages
436
Office Version
  1. 2019
Hello all.

Ugh. A colleague told me that I should use the Macro function to import text files. I have always used VBA via the Modules to do it.

So anyway, I am using TransferText and I keep on getting a 'Cannot Update. Database or Object is read-only'.

For the file name I am using: \TKT01\RETURNS\CTO\KS0028 File Import\KS0028.MBK

I thought it was the .MBK extension, so I removed it, but still am getting the same message. I don't get this message using VBA/Modules.

Any thoughts? Thank you.
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Use VBA?

If you get an error there then you might get a better idea of what the problem is.
 
Upvote 0
Sorry. I meant when I use VBA to import the file I don't get any permission violation errors. It imports fine.
 
Upvote 0
Well use VBA if it works.

I really don't see why you would want to use a macro, especially if it might not work.

Perhaps there are some hidden advantages I've never heard about.:)
 
Upvote 0
What happens if you change your file extension to a valid text file extension, like TXT?
 
Upvote 0
For the file name I am using: \TKT01\RETURNS\CTO\KS0028 File Import\KS0028.MBK
If that indeed is the file path you are passing it, then it should fail as that is not a valid path. It needs either a drive letter or the FULL UNC path. Any path that starts out with a single backslach is not a valid path.
 
Upvote 0
Good catch Bob. Don't know how I overlooked that...
I guess I was focusing too much on the file name and didn't check out the complete path.
 
Upvote 0
That's not it. I didn't copy the entire path. Sorry about that.

K:\TKT01\RETURNS\CTO\KS0028 File Import\KS0028.MBK
 
Upvote 0
I'm afraid I don't think that's the UNC path that Bob was referrring to.
 
Upvote 0
Does changing the file extension to TXT work?
 
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,877
Members
452,949
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top