Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default ShowDataForm not showing selected range

Hi,

I am trying to use the ShowDataForm method to provide a quick and easy
update approach for a series of reference data items in a workbook that has
been developed.

When I use the ShowDataForm method via the Data menu option within the
workbook is works fine and allows me to insert, edit and remove rows from the
data.

When I included as code within the workbook for some reason it only
recognises the first row of data in the worksheet and does not go to the
selected range.....is there anyway to ensure that ShowDataForm recognises the
selected range ? refer to the code below

Private Sub ReferenceUpdateButton_Click()

Sheets("Reference").Select
Range("A5").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveSheet.ShowDataForm

End Sub

The Reference worksheet looks something like this


Reference Data
This worksheet contains all reference data including Building details for
the inspections and Price lists for the quotations

Unit Type Reference List
Unit Type Area Item Item Type Specifications Oaks Price Customer Price
Quantity
1 Bedroom Bathroom 1a Bath Building Works $- $-
1 Bedroom Bathroom 1 Doors/Walls Building Works $- $-
1 Bedroom Bathroom 1 Floor/floor coverings Building Works $- $-


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default ShowDataForm not showing selected range

Here's an article that explains how the problem occurs in VBA (with solution)
http://support.microsoft.com/default...;en-us;q110462
XL: ShowDataForm Method Fails If Data Can't Be Found

scott56hannah wrote:

Hi,

I am trying to use the ShowDataForm method to provide a quick and easy
update approach for a series of reference data items in a workbook that has
been developed.

When I use the ShowDataForm method via the Data menu option within the
workbook is works fine and allows me to insert, edit and remove rows from the
data.

When I included as code within the workbook for some reason it only
recognises the first row of data in the worksheet and does not go to the
selected range.....is there anyway to ensure that ShowDataForm recognises the
selected range ? refer to the code below

Private Sub ReferenceUpdateButton_Click()

Sheets("Reference").Select
Range("A5").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveSheet.ShowDataForm

End Sub

The Reference worksheet looks something like this

Reference Data
This worksheet contains all reference data including Building details for
the inspections and Price lists for the quotations

Unit Type Reference List
Unit Type Area Item Item Type Specifications Oaks Price Customer Price
Quantity
1 Bedroom Bathroom 1a Bath Building Works $- $-
1 Bedroom Bathroom 1 Doors/Walls Building Works $- $-
1 Bedroom Bathroom 1 Floor/floor coverings Building Works $- $-


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default ShowDataForm not showing selected range

Thankyou....the article was very useful and has resolved my problem

"Dave Peterson" wrote:

Here's an article that explains how the problem occurs in VBA (with solution)
http://support.microsoft.com/default...;en-us;q110462
XL: ShowDataForm Method Fails If Data Can't Be Found

scott56hannah wrote:

Hi,

I am trying to use the ShowDataForm method to provide a quick and easy
update approach for a series of reference data items in a workbook that has
been developed.

When I use the ShowDataForm method via the Data menu option within the
workbook is works fine and allows me to insert, edit and remove rows from the
data.

When I included as code within the workbook for some reason it only
recognises the first row of data in the worksheet and does not go to the
selected range.....is there anyway to ensure that ShowDataForm recognises the
selected range ? refer to the code below

Private Sub ReferenceUpdateButton_Click()

Sheets("Reference").Select
Range("A5").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveSheet.ShowDataForm

End Sub

The Reference worksheet looks something like this

Reference Data
This worksheet contains all reference data including Building details for
the inspections and Price lists for the quotations

Unit Type Reference List
Unit Type Area Item Item Type Specifications Oaks Price Customer Price
Quantity
1 Bedroom Bathroom 1a Bath Building Works $- $-
1 Bedroom Bathroom 1 Doors/Walls Building Works $- $-
1 Bedroom Bathroom 1 Floor/floor coverings Building Works $- $-


--

Dave Peterson

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
No color is showing up when cells are selected Carol-Ann Excel Discussion (Misc queries) 1 November 25th 08 06:32 AM
Excel selected range not showing when Excel application not in focus ewolfman Excel Discussion (Misc queries) 0 January 9th 07 10:40 PM
Showing selected cell value Misssy Excel Programming 4 November 11th 05 05:48 PM
combo box not showing selected item.. nycdon Excel Programming 1 August 17th 05 06:28 PM
Open a window / box showing a selected range of cells only jennie Excel Programming 2 April 30th 04 02:32 PM


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