Profile.UserName プロパティ (プロジェクト)

取得または、現在のアカウント ・ プロファイルのログオン名を設定します。 読み取り/書き込みが可能な 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 のサポートおよびフィードバックを参照してください。