Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default how to bring up a data form with VBA

I've got a table of data that I would like to display in Excel's built-in
data form that you can call up manually by highlighting a range of data and
selecting the Form command from the Data menu. However, I would like to
write a VBA procedure that would enable the user to do this by simply
clicking on the command button.

The region I would like to display in this form could be described as

Range("DataTable").CurrentRegion

Can anyone tell me what code I can use to bring up Excel's built-in data
form to display the data in that range?

Thanks in advance.

Paul


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default how to bring up a data form with VBA

Thanks for your help again, Tom.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default how to bring up a data form with VBA

My mistake. Glad you fixed it.

--
Regards,
Tom Ogilvy

Paul James wrote in message
...
Actually a small modification is needed to get the code to work.
ShowDataForm isn't a method of the Application object, but it is a method

of
the ActiveSheet object. So the working code would be:

Range("DataTable").CurrentRegion.Name = "Database"
ActiveSheet.ShowDataForm

Again, thanks for showing me how to do this, Tom.

Paul




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
Bring filtered data from another file cousinexcel Excel Discussion (Misc queries) 0 January 11th 10 07:06 AM
Macro to bring up Data Form jk Excel Discussion (Misc queries) 1 October 19th 09 11:59 PM
bring in data from one worksheet to another Nishism Excel Worksheet Functions 1 February 23rd 07 01:56 AM
Create a form in excel so I can enter data using DataForm Lynn Excel Discussion (Misc queries) 2 February 14th 07 06:35 PM
how to get a data form to fill you own exel sheet (was data-form erik van buijtenen Excel Worksheet Functions 2 May 30th 06 05:31 PM


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

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"