Hello Thai,
Mostly I have just a short time on the computers per day. But I am glad to help, so post any questions that you have at any time, and I will gladly answer them when I look in to the Forum from time to time.
I see you have a new temporary gmail for our experimenting. Thank you. This is very useful. You have passed me the password privately, so we can share this for now. Later you can forget about the account, or you can change the password and continue using it just for your private use, ( and / or that of your colleagues )
Here is the info you have given me:
Our temporary email : excellearning12@gmail.com
Current password : xxxxxxxxxx - I will not publish this in the Forum. You have given this to me privately,
_.____________________
You do not need the passwords from your team.Originally Posted by Thainguyen
You do not need any passwords of the people to whom the program sends the Email
The Program can send the Email to many people.
You can add as many people to send to as you like. You do it like this:
.To = "ThaiAdresse@gmail.com"
.cc = "TeamMember1@t-online.de"
.cc = "Teammember3@gmail.com"
.cc = "TeamMember2@gmail.com"
.cc = “TeamMember205@someEmail.xyz”
.cc = "Anyone@AnyEMail.yahoo.com"
.cc = ……..
_.... etc.. etc….
There is no requirement to have the passwords for any team members. You do not need any password of anyone that you send the Email to. You only need their Email address . - You add their Email address to the list of .cc s as I show above
_.__________________________
You gave me a file privately.Originally Posted by Thainguyen
You have saved the file as .xlsm. Yes, this is good
But..
You have put the code in the wrong code module.
You put it here:
WorksheetCodeModule.JPG : https://imgur.com/6O6Nj7m
That is incorrect.
Sub Workbook_Open() is a special code. it works automatically when the workbook opens and macros are enabled.
It belongs here:
ThisWorkbookCodeModule2.JPG : https://imgur.com/JlFFBWP
But this is not important for our experiments, because: if it is in ThisWorkbook Code Module, then the code will work automatically when the workbook is opened.
For our experiments it is better to leave it in the Worksheet ( Sheet1 ) Code Module
For our experiments we will leave it in Worksheet ( Sheet1 ) Code Module. This is easier for our experiments. It is easier for now, because then we do not need to keep closing and opening the workbook to get the code to work. Just for our experiments we can run the code manually. ( Later we can put the code in the ThisWorkbook Code Module )
We can run the code manually. This is better for our experiments:
To Run the code manually from Worksheet ( Sheet1 ) Code Module, do this:
_1) Open File, “Equipment- Maint RecordsThai1.xlsm” ( I send this to you privately as it has our temporary password in it )
_2) Enable macros
_3a) Hit Alt+F11 to see VB Editor, and then Double click on “Sheet1 ( EquipmentPM)” in VBA Project Window
Sheet1 ( EquipmentPM).JPG : https://imgur.com/N9AmTyI
Or
_3b) Right click on first Tab and select “View Code” : https://imgur.com/dFUcwtP
ViewCodeFirsttabCodeModule.JPG : https://imgur.com/rx4EnWP
_4a) Click anywhere in the code, _4b) and hit Play>, ( or Hit key F5 )
_4aClickInCode _4bPlay(or hit F5) .JPG : https://imgur.com/gdGldCt
See how you get on, and let me know how you get on.
( I send you the file, “Equipment- Maint RecordsThai1.xlsm” , privately later after I post this )
Alan




Reply With Quote
Bookmarks