![]() |
copying text into a macro
I was trying to write a macro in which I was copying a selection from a combo box into a second macro which would then be run under instruction from the first macro. However the second macro wouldn't allow me to copy in text. Effectively what I am building is a very simple search engine, searching a column, but I don't want to use Auto filter or custom filter, I want a macro to take care of it all so that the user just has one button to click on, after making a selection in the combo box. 2nd problem. I have some control buttons, and they change size, even though I have auto formatted them not to in properties. Any suggestions? -- pagelocator ------------------------------------------------------------------------ pagelocator's Profile: http://www.excelforum.com/member.php...o&userid=16506 View this thread: http://www.excelforum.com/showthread...hreadid=320013 |
Hi
You pass text from one macro to another like this: Sub MainMan() Dim S As String S = ComboBox1.Text Call SlaveMan(S) End Sub Sub SlaveMan(S As String) MsgBox "Action here using text " & S End Sub HTH. Best wishes Harald "pagelocator" skrev i melding ... I was trying to write a macro in which I was copying a selection from a combo box into a second macro which would then be run under instruction from the first macro. However the second macro wouldn't allow me to copy in text. Effectively what I am building is a very simple search engine, searching a column, but I don't want to use Auto filter or custom filter, I want a macro to take care of it all so that the user just has one button to click on, after making a selection in the combo box. 2nd problem. I have some control buttons, and they change size, even though I have auto formatted them not to in properties. Any suggestions? -- pagelocator ------------------------------------------------------------------------ pagelocator's Profile: http://www.excelforum.com/member.php...o&userid=16506 View this thread: http://www.excelforum.com/showthread...hreadid=320013 |
All times are GMT +1. The time now is 03:13 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com