Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Including an input box within a macro


Ok, I need to create a button with a macro attached which allows me to
delete columns within a worksheet,

in this macro I must include an input box which asks the user to

identify as 'the treasurer' and delete all 'financial' data
(G3:H17 & K3:K17) or
identify as 'the registrar' and delete all 'results' data
(E3:I17)

how do I this?


--
Drummy
------------------------------------------------------------------------
Drummy's Profile: http://www.excelforum.com/member.php...o&userid=34780
View this thread: http://www.excelforum.com/showthread...hreadid=548868

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Including an input box within a macro

If you use Application Inputbox with a type of 8, you can allow the user to
select the columns rather than type it in

Dim rng As Range

Set rng = Application.Inputbox("Select appropriate data",Type:=8)

If not rng Is Nothing Then
rng.EntireColumn.Delete
End If

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Drummy" wrote in
message ...

Ok, I need to create a button with a macro attached which allows me to
delete columns within a worksheet,

in this macro I must include an input box which asks the user to

identify as 'the treasurer' and delete all 'financial' data
(G3:H17 & K3:K17) or
identify as 'the registrar' and delete all 'results' data
(E3:I17)

how do I this?


--
Drummy
------------------------------------------------------------------------
Drummy's Profile:

http://www.excelforum.com/member.php...o&userid=34780
View this thread: http://www.excelforum.com/showthread...hreadid=548868



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
including entire worksheet sort in a macro PatD Excel Discussion (Misc queries) 2 July 10th 09 06:40 PM
run macro with input msg based on cell input Janelle S Excel Discussion (Misc queries) 0 January 20th 08 05:23 AM
Input Box within a macro McCloudK Excel Discussion (Misc queries) 3 September 28th 07 09:31 PM
Spreadsheet print including macro buttons? gunga Excel Discussion (Misc queries) 4 February 10th 05 06:30 PM
Need Help w/ Print Macro to Print All Visible Sheets (including Charts) in a Workbook will Excel Programming 3 September 23rd 04 08:05 PM


All times are GMT +1. The time now is 01:51 PM.

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

About Us

"It's about Microsoft Excel"