473,320 Members | 2,109 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Password Excel Documents (VB)

18
Hi

Wondered if anyone can help. I am trying to open an excel docuement which is sent externally. Sometimes the same document can contain the password in both upper and lower case. Is there a way to open it through VB regardless of case?

The code I am currently using is

Batley_and_Spen = "G:\OPS\Contracts_and_Monitoring\Management_Inform ation\Home Care Database\Transfers\2008-2009\Wk01_01_04_08\Batley_and_Spen.xls"
Workbooks.Open Batley_and_Spen, , , , "ABC123" Or "abc123", "abc123" Or "abc123"

Thanks

Andy
Mar 28 '08 #1
1 1036
kadghar
1,295 Expert 1GB
Hi

Wondered if anyone can help. I am trying to open an excel docuement which is sent externally. Sometimes the same document can contain the password in both upper and lower case. Is there a way to open it through VB regardless of case?

...

Thanks

Andy
While defining passwords, use UCASE function, while reading them use it too.

But of course, if you're trying to open a file with an already set password, i'd hate it if you could skip the Case Sensitive just like that. Case sensitive passwords are not bugs, they are features for increasing security.
Mar 28 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Geert-Pieter Hof | last post by:
Hello, My VB 6.0 application read and writes data from and to a MS Excel workbook, using the Microsoft.Jet.OLEDB.4.0 provider. Now I want to protect the Excel workbook with a password, but I...
1
by: frankvfox | last post by:
I need a code sample using VB ASP.Net 2003 which exports a tab delimited text file resident on the server into an Excel spreadsheet which will be saved through the browser to the client's local...
1
by: Jim | last post by:
This should really be simple, but I can't figure it out. I have some VB that exports a table in an Excel format ("C:\NewReport.xls"). After the export is done, I simply want to have some code...
3
by: Dent2 | last post by:
I wrote a nice C# excel routine to automate the formatting of some raw CSV data. I wrote the routine on a WinXP computer with Visual Studio .NET 2003 and Office XP installed. It compiled and ran...
6
by: nitromuse | last post by:
I haven't been able to configure a data adapter with the wizard for Excel (Access is no problem) and when I try to do it in code I still have problems, can anyone help, here is some code I've been...
9
by: Anthony | last post by:
To me, creating Excel 2003 spreadsheets programmatically via VB.NET hasn't really changed since the days of VB6. That is, I'd do something similar to this Code: Dim ExcelApp As...
3
by: herman404 | last post by:
Hi everyone, I have data coming to me in the form of Word and Excel files, and I need to place this data into a SQL Server database. The Word file will be coming in text which is similiar to an...
0
by: lstad | last post by:
I have a basic spreadsheet that has elementary vb code in it. The spreadsheet acts as a todo list and when I put an "x" in colum 4, I get timestamp, date, and username in columns 5, 6, 7. The code...
1
by: asillam | last post by:
Hi I`m trying to automate saving Excel sheets (each one) in csv file format with vbScript. Loop preferable I tried something... please someone help me. Sub CSV2() Dim appExcel As...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.