Profile.UserName プロパティ (Project)

取得または、現在のアカウント ・ プロファイルのログオン名を設定します。 読み取り/書き込みが可能な String です。

構文

Profile オブジェクトを表す変数。

注釈

Profile オブジェクトの UserName プロパティは、ログオン名を示します。 これに対し、Application オブジェクトの UserName プロパティにはローカル ユーザー名が表示されます。

If there are two account profiles, and the user named Jeff Smith logs on with the DOMAIN\jsmith account, the first statement in the following code shows DOMAIN\jsmith in the Immediate pane of the VBE. The second statement shows Jeff Smith.

Debug.Print Profiles(2).UserName 
Debug.Print UserName

サポートとフィードバック

Office VBA またはこの説明書に関するご質問やフィードバックがありますか? サポートの受け方およびフィードバックをお寄せいただく方法のガイダンスについては、Office VBA のサポートおよびフィードバックを参照してください。