Open CSV file read only

baha17

Board Regular
Joined
May 12, 2010
Messages
183
Hi Everyone,

I have a code which opens a CSV file extract data then close without saving. I don't want to change the CSV file format to excel-sharing workbook opening and closing time. Now is there any way to open CSV file by multi user at the same time. It can be open as ready only,but do not want to see the alert message.
Thank you very much for your time.
Regards,
Baha
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
I have a code which opens a CSV file extract data then close without saving.

What is your current code?
Please post it here using
Code:
 tags, so that the code appears formatted.
 
Upvote 0
Hi Wigi,
Here is my code.
Thanks for help.
Baha

Sub GetTheTableList()
Dim cel As Range
Application.DisplayAlerts = False
On Error Resume Next
Sheets("Update").Range("B8:B39").ClearContents
Workbooks.Open Filename:="J:\PLAZA CONTROL PIT\PitHU\Plaza_ListOfTables.csv", ReadOnly:=True
Windows("Plaza_ListOfTables.csv").Activate
For Each cel In Sheets("Plaza_ListOfTables").Range("A1:C5000")
Windows("Plaza_PitResulT 1.0.4.xls").Activate
If cel.Value = Sheets("Update").Range("D2").Value Then
Columns("B").Find("", Sheets("Update").Range("B7"), xlValues, xlWhole, xlNext).Select
ActiveCell = cel.Offset(0, -2)
End If
Next cel
Windows("Plaza_ListOfTables.csv").Activate
ActiveWorkbook.Close SaveChanges:=False
Windows("Plaza_PitResulT 1.0.4.xls").Activate
Sheets("Update").Range("B40") = "TOTAL"
Sheets("Update").Select
Cells(1, 1).Select
Application.DisplayAlerts = True

End Sub
 
Upvote 0
Hi Wigi,

Eventhough I use readonly but still multible users cannot open the file without message prompt.
I tried to stick with share workbook option but opening file takes time.
thanks Baha
 
Upvote 0

Forum statistics

Threads
1,223,054
Messages
6,169,834
Members
452,284
Latest member
TKM623

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