[RESOLVED] Fill textbox from command button outlook vba
Hi title says it all really
I am running Outlook 2003 and the form is IPM.Note
i have managed to find the code editor on outlook(lol very basic), i need to modify an outlook form but before i set out on that journy was just trying some basic stuff fill a textbox from a command button.
did the following it keeps telling me the TextBox1 control is missing but it is on the form.
Code:
Sub Cmd1_click
Textbox1.Value = "Test"
End Sub
Button and textbox defiantly exist and i have checked the names i am guessing there maybe a page or form i need to put in front of the textbox1.value?
Last edited by nabbster; Feb 1st, 2008 at 01:38 PM.
Bah thought so stupid thing is i cant find the name of the user form, i am used to going to properties and its there for you with this it isn't the case. any ideas how to find out the name of the form this control sits on?
Like i said, I have not worked with outlook. but my logic which again could be wrong is to double click on the form and a code window should open with the name of the form... something like
vb Code:
Private Sub UserForm_Click()
End Sub
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread "Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
Nope nothing happens if i double click it i thought same. i am sure your right about the controls path i tried a msgbox in the button click and it worked right off. thought i was loosing my mind for a second. This is some one else's form that he has reached his limit of knowledge on and it was passed onto me.
Ill check see if he has locked it or some thing and if he can remember what he named the form unless in the mean time some bright spark can give me any other routes to finding the forms name.
Mmmmm form isn't locked by the last guy i dont think i just ran a new one and added a Textbox and commandbutton cant double click that o the controls on it either, maybe its a setting on my outlook.
Picture attached
Last edited by nabbster; Feb 1st, 2008 at 02:45 PM.
after seeing the pic two things that immeadiately came to my mind were...
1) it doesn't look like a form... it looks more like a page
2) Under the view menu, do you have something like "properties window". or select commanbutton and press "F4"...
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread "Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
Nope neither Maybe because its based on a template in the file system it has limited facility i can certainly add textboxs, buttons, lables, frames ect and as i said i can display a msgbog with the code in the Cmd1_click event it does not want to recognise the other controls i even tried setting the command buttons caption again object missing. very strange.