LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 587
Default how to use VBA code to create 'Select Data Range' userform.

here is the syntax for the InputBox Method

expression.InputBox(Prompt, Title, Default, Left, Top, HelpFile, HelpContextId, Type)

0 formula
1 number
2 string
4 logical (True or False)
8 cell reference in the form of a Range object
16 error value, such as # N / A
64 array of values


Dim rng As Range, dataname As String

Set rng = Application.InputBox(prompt:="Do your selection in the summary page", Type:=8)
dataname = Application.InputBox(prompt:="type the name of data", Type:=2)

Me.TextBox1 = dataname
Me.TextBox2 = rng.Parent.Name& "!"& rng.Address

but i do not see why you can not used directly a texbox on userform


--
isabelle


 
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
Code to Create Input Box To Select a File Jeremy Excel Programming 1 April 8th 08 04:38 PM
create Macro €“ select data, sort by acc no., yr, part no, create P Johnny Excel Programming 0 November 22nd 06 03:18 PM
Using code to create a control on an Excel userform Fred Holmes Excel Programming 1 November 17th 04 09:38 PM
How to create in a userform, select all/deselect all checkboxes Intruder Excel Programming 1 July 31st 03 04:53 AM


All times are GMT +1. The time now is 06:20 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"