ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   GetObject with Password (https://www.excelbanter.com/excel-programming/357436-getobject-password.html)

[email protected]

GetObject with Password
 
Bonjour from Paris (FRANCE),

It's a sunny day, today.

How can add passwords (Password and WriteResPassword) to a GetObject
function used to open an Excel Workbook ?

Thanks by anticipation.


Carim

GetObject with Password
 

Hi,

If I understand you correctly, following should help :
YourObject.Workbooks.Open Filename:=YourFile, password:="ABCD"

HTH
Carim


Papou

GetObject with Password
 
Hi (Salut)
Depends on where you run your code from.
From vbscript: Use the CreateObject object to reach the Workbook Object
Methods (via the Excel Application).
From Excel:
Dim wbk As Workbook
Set wbk = GetObject("C:\zozo.xls")
wbk.Open "C:\zozo.xls", , , , "toto", "titi"

HTH
Cordially
Pascal (il ne fait pas beau chez moi !)



[email protected]

GetObject with Password
 
Thanks Papou et Carim,

But i beg your pardon 'cause in place of workbook i'ld have written
'WorkSheet'.
I want to get in an open workbook, as directly as possible a copy of
one sheet extracted from another workbook supposed not open.


Papou

GetObject with Password
 
Hi
Not too sure about what you mean!
I suggest you post your message in French he
microsoft.public.fr.excel

A tout à l'heure !
HTH
Cordially
Pascal



[email protected]

GetObject with Password
 
Bonjour Papou,

Le classeur source doit resté protégé par mot de passe en accés.

Si j'utilise Workbook.open, je dois faire :
1) Ajouter une feuille au classeur actif,
2) Ouvrir le classeur source avec le ou les mot(s) de passe,
3) Sélectionner la feuille source,
4) Copier les données,
5) Basculer sur le classeur de travail,
6) Coller les données sur la page ajoutée.


En utilisant GetObject pas besoin de toutes ces 'gesticulations' pour
obtenir les données dans le classeur actif. Par contre il faut saisir
manuellement le mot de passe en accés et soit le mot de passe en
écriture soit cliquer sur 'lecture seule', ce qui nécessite de
diffuser un mot de passe.
C'est pourquoi s'il est possible d'inclure le mot de passe dans
GetObject mes utilisateurs seraient satisfaits.


Merci par avance de votre collaboration.

Jean-Paul


Papou

GetObject with Password
 
Re
Tu n'as pas compris la suggestion, j'ai dû mal m'exprimer
il faut envoyer ta question sur le forum Excel français
"microsoft.public.fr.excel"

Cordialement
Pascal





[email protected]

GetObject with Password
 
Le texte ci-dessus est en place depuis mercredi 10h34 sans aucune
réponse, aussi je me suis rabattu sur ce NG.

I've posted this question on the french excel NGbut without any
suggestion, that why i posted it here.

Thanks

Jean-Paul



All times are GMT +1. The time now is 02:53 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com