Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
pagelocator
 
Posts: n/a
Default 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

  #2   Report Post  
Harald Staff
 
Posts: n/a
Default

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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying with a macro Markxxx Excel Discussion (Misc queries) 1 January 13th 05 09:56 AM
Read Text File into Excel Using VBA Willie T Excel Discussion (Misc queries) 13 January 8th 05 12:37 AM
Macro Text into Excell Krefty Excel Discussion (Misc queries) 2 December 20th 04 09:14 PM
Issue with copying Text. David Excel Discussion (Misc queries) 2 December 17th 04 12:39 AM
Macro or Function to make text size to suite text Length? lbbss Excel Discussion (Misc queries) 4 December 14th 04 07:53 PM


All times are GMT +1. The time now is 12:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"