Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default ShowDataForm of Worksheet class failed

Sub AddProduct()
Application.ScreenUpdating = False

Range("AA1:AB1").Select
Range(Selection, Selection.End(xlDown)).Select ' error with or
without this line
Application.CutCopyMode = False ' error
with or without this line
ActiveSheet.ShowDataForm '
produces the error

Application.ScreenUpdating = True

End Sub

I can produce the form manually selecting Data|Form. However, when trying
to add more items, get "cannot extend list or database".

Any ideas?

TIA
doco


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default ShowDataForm of Worksheet class failed


Hello Don,

Try this method....

With ActiveSheet
.Range("AA1:AB1").Select
.ShowDataForm
End With

ActiveCell.Select

Sincerely,
Leith Ros

--
Leith Ros
-----------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...fo&userid=1846
View this thread: http://www.excelforum.com/showthread.php?threadid=47770

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default ShowDataForm of Worksheet class failed

Try naming the range "Database" like this:

Sub AddProduct()
Application.ScreenUpdating = False

Range("AA1:AB1").Select
Range(Selection, Selection.End(xlDown)).Select ' error with or
without this line

Selection.Name = "Database"

Application.CutCopyMode = False ' error
with or without this line
ActiveSheet.ShowDataForm '
produces the error

Application.ScreenUpdating = True

End Sub

Mike F

"Don Cossitt" wrote in message
...
Sub AddProduct()
Application.ScreenUpdating = False

Range("AA1:AB1").Select
Range(Selection, Selection.End(xlDown)).Select ' error with
or without this line
Application.CutCopyMode = False ' error
with or without this line
ActiveSheet.ShowDataForm ' produces
the error

Application.ScreenUpdating = True

End Sub

I can produce the form manually selecting Data|Form. However, when trying
to add more items, get "cannot extend list or database".

Any ideas?

TIA
doco



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default ShowDataForm of Worksheet class failed

That did the trick. I am not sure why that would matter but - it worked
thanks.

doco


"Mike Fogleman" wrote in message
...
Try naming the range "Database" like this:

Sub AddProduct()
Application.ScreenUpdating = False

Range("AA1:AB1").Select
Range(Selection, Selection.End(xlDown)).Select ' error with
or
without this line

Selection.Name = "Database"

Application.CutCopyMode = False ' error
with or without this line
ActiveSheet.ShowDataForm '
produces the error

Application.ScreenUpdating = True

End Sub

Mike F

"Don Cossitt" wrote in message
...
Sub AddProduct()
Application.ScreenUpdating = False

Range("AA1:AB1").Select
Range(Selection, Selection.End(xlDown)).Select ' error with
or without this line
Application.CutCopyMode = False ' error
with or without this line
ActiveSheet.ShowDataForm ' produces
the error

Application.ScreenUpdating = True

End Sub

I can produce the form manually selecting Data|Form. However, when
trying to add more items, get "cannot extend list or database".

Any ideas?

TIA
doco





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default ShowDataForm of Worksheet class failed

Excel tries to determine on its own where the data table is by contiguous
cells, when you call for the DataForm. If you have more than one area of
contiguous cells, then Excel is confused as to which table it should use,
and therefore errors. You tell Excel which table to use by naming it
"Database". I have a workbook with 12 little 'Databases' on one hidden
sheet. Each area is separated by blank cells. When I want the DataForm to
show a certain area, I activate the upper left cell of the area and tell
Excel Activecell.CurrentRegion.Name = "Database". Then the DataForm knows to
use that area only.
I hope this explains it a little clearer.

Mike F
"doco" wrote in message
...
That did the trick. I am not sure why that would matter but - it worked
thanks.

doco


"Mike Fogleman" wrote in message
...
Try naming the range "Database" like this:

Sub AddProduct()
Application.ScreenUpdating = False

Range("AA1:AB1").Select
Range(Selection, Selection.End(xlDown)).Select ' error with
or
without this line

Selection.Name = "Database"

Application.CutCopyMode = False ' error
with or without this line
ActiveSheet.ShowDataForm '
produces the error

Application.ScreenUpdating = True

End Sub

Mike F

"Don Cossitt" wrote in message
...
Sub AddProduct()
Application.ScreenUpdating = False

Range("AA1:AB1").Select
Range(Selection, Selection.End(xlDown)).Select ' error with
or without this line
Application.CutCopyMode = False ' error
with or without this line
ActiveSheet.ShowDataForm '
produces the error

Application.ScreenUpdating = True

End Sub

I can produce the form manually selecting Data|Form. However, when
trying to add more items, get "cannot extend list or database".

Any ideas?

TIA
doco









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default ShowDataForm of Worksheet class failed

Interestingly, it will only work if the first list is in column A. Placed
in any other column produces and error. Is this a bug or is there a
workaround?

TIA
doco



"doco" wrote in message
...
That did the trick. I am not sure why that would matter but - it worked
thanks.

doco


"Mike Fogleman" wrote in message
...
Try naming the range "Database" like this:

Sub AddProduct()
Application.ScreenUpdating = False

Range("AA1:AB1").Select
Range(Selection, Selection.End(xlDown)).Select ' error with
or
without this line

Selection.Name = "Database"

Application.CutCopyMode = False ' error
with or without this line
ActiveSheet.ShowDataForm '
produces the error

Application.ScreenUpdating = True

End Sub

Mike F

"Don Cossitt" wrote in message
...
Sub AddProduct()
Application.ScreenUpdating = False

Range("AA1:AB1").Select
Range(Selection, Selection.End(xlDown)).Select ' error with
or without this line
Application.CutCopyMode = False ' error
with or without this line
ActiveSheet.ShowDataForm '
produces the error

Application.ScreenUpdating = True

End Sub

I can produce the form manually selecting Data|Form. However, when
trying to add more items, get "cannot extend list or database".

Any ideas?

TIA
doco







  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default ShowDataForm of Worksheet class failed

I can't imagine why not. I tried inserting a blank column A ahead of my
data, once I changed the reference, it still worked as before.

Mike F
"doco" wrote in message
...
Interestingly, it will only work if the first list is in column A. Placed
in any other column produces and error. Is this a bug or is there a
workaround?

TIA
doco



"doco" wrote in message
...
That did the trick. I am not sure why that would matter but - it worked
thanks.

doco


"Mike Fogleman" wrote in message
...
Try naming the range "Database" like this:

Sub AddProduct()
Application.ScreenUpdating = False

Range("AA1:AB1").Select
Range(Selection, Selection.End(xlDown)).Select ' error with
or
without this line

Selection.Name = "Database"

Application.CutCopyMode = False ' error
with or without this line
ActiveSheet.ShowDataForm '
produces the error

Application.ScreenUpdating = True

End Sub

Mike F

"Don Cossitt" wrote in message
...
Sub AddProduct()
Application.ScreenUpdating = False

Range("AA1:AB1").Select
Range(Selection, Selection.End(xlDown)).Select ' error
with or without this line
Application.CutCopyMode = False '
error with or without this line
ActiveSheet.ShowDataForm '
produces the error

Application.ScreenUpdating = True

End Sub

I can produce the form manually selecting Data|Form. However, when
trying to add more items, get "cannot extend list or database".

Any ideas?

TIA
doco









  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default ShowDataForm of Worksheet class failed

A1:B1 contain headers for a list 90 rows deep. D1:F1 contain headers for
list only two deep. When accessing list two @ D1:F1programmatically, data
form shows list A1:B1, not D1:F1. If I move 'table' two 19 cols to the
right and access programmatically; I get the original worksheet class
failure error, but works fine if I manually [Data|Form] select the list.

The dataform will only work programatically if the list begins in A1 of any
sheet.

Its maddening!
doco


"Mike Fogleman" wrote in message
...
I can't imagine why not. I tried inserting a blank column A ahead of my
data, once I changed the reference, it still worked as before.

Mike F
"doco" wrote in message
...
Interestingly, it will only work if the first list is in column A.
Placed in any other column produces and error. Is this a bug or is there
a workaround?

TIA
doco



"doco" wrote in message
...
That did the trick. I am not sure why that would matter but - it worked
thanks.

doco


"Mike Fogleman" wrote in message
...
Try naming the range "Database" like this:

Sub AddProduct()
Application.ScreenUpdating = False

Range("AA1:AB1").Select
Range(Selection, Selection.End(xlDown)).Select ' error
with or
without this line

Selection.Name = "Database"

Application.CutCopyMode = False '
error
with or without this line
ActiveSheet.ShowDataForm '
produces the error

Application.ScreenUpdating = True

End Sub

Mike F

"Don Cossitt" wrote in message
...
Sub AddProduct()
Application.ScreenUpdating = False

Range("AA1:AB1").Select
Range(Selection, Selection.End(xlDown)).Select ' error
with or without this line
Application.CutCopyMode = False ' error
with or without this line
ActiveSheet.ShowDataForm '
produces the error

Application.ScreenUpdating = True

End Sub

I can produce the form manually selecting Data|Form. However, when
trying to add more items, get "cannot extend list or database".

Any ideas?

TIA
doco











  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default ShowDataForm of Worksheet class failed

I sent you a working to sample to play with.

Mike F
"doco" wrote in message
...
A1:B1 contain headers for a list 90 rows deep. D1:F1 contain headers for
list only two deep. When accessing list two @ D1:F1programmatically, data
form shows list A1:B1, not D1:F1. If I move 'table' two 19 cols to the
right and access programmatically; I get the original worksheet class
failure error, but works fine if I manually [Data|Form] select the list.

The dataform will only work programatically if the list begins in A1 of
any sheet.

Its maddening!
doco


"Mike Fogleman" wrote in message
...
I can't imagine why not. I tried inserting a blank column A ahead of my
data, once I changed the reference, it still worked as before.

Mike F
"doco" wrote in message
...
Interestingly, it will only work if the first list is in column A.
Placed in any other column produces and error. Is this a bug or is
there a workaround?

TIA
doco



"doco" wrote in message
...
That did the trick. I am not sure why that would matter but - it
worked thanks.

doco


"Mike Fogleman" wrote in message
...
Try naming the range "Database" like this:

Sub AddProduct()
Application.ScreenUpdating = False

Range("AA1:AB1").Select
Range(Selection, Selection.End(xlDown)).Select ' error
with or
without this line

Selection.Name = "Database"

Application.CutCopyMode = False ' error
with or without this line
ActiveSheet.ShowDataForm '
produces the error

Application.ScreenUpdating = True

End Sub

Mike F

"Don Cossitt" wrote in message
...
Sub AddProduct()
Application.ScreenUpdating = False

Range("AA1:AB1").Select
Range(Selection, Selection.End(xlDown)).Select ' error
with or without this line
Application.CutCopyMode = False ' error
with or without this line
ActiveSheet.ShowDataForm '
produces the error

Application.ScreenUpdating = True

End Sub

I can produce the form manually selecting Data|Form. However, when
trying to add more items, get "cannot extend list or database".

Any ideas?

TIA
doco













  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default ShowDataForm of Worksheet class failed

Got it! Thanks
doco

"Mike Fogleman" wrote in message
...
I sent you a working to sample to play with.

Mike F
"doco" wrote in message
...
A1:B1 contain headers for a list 90 rows deep. D1:F1 contain headers for
list only two deep. When accessing list two @ D1:F1programmatically,
data form shows list A1:B1, not D1:F1. If I move 'table' two 19 cols to
the right and access programmatically; I get the original worksheet class
failure error, but works fine if I manually [Data|Form] select the list.

The dataform will only work programatically if the list begins in A1 of
any sheet.

Its maddening!
doco


"Mike Fogleman" wrote in message
...
I can't imagine why not. I tried inserting a blank column A ahead of my
data, once I changed the reference, it still worked as before.

Mike F
"doco" wrote in message
...
Interestingly, it will only work if the first list is in column A.
Placed in any other column produces and error. Is this a bug or is
there a workaround?

TIA
doco



"doco" wrote in message
...
That did the trick. I am not sure why that would matter but - it
worked thanks.

doco


"Mike Fogleman" wrote in message
...
Try naming the range "Database" like this:

Sub AddProduct()
Application.ScreenUpdating = False

Range("AA1:AB1").Select
Range(Selection, Selection.End(xlDown)).Select ' error
with or
without this line

Selection.Name = "Database"

Application.CutCopyMode = False ' error
with or without this line
ActiveSheet.ShowDataForm '
produces the error

Application.ScreenUpdating = True

End Sub

Mike F

"Don Cossitt" wrote in message
...
Sub AddProduct()
Application.ScreenUpdating = False

Range("AA1:AB1").Select
Range(Selection, Selection.End(xlDown)).Select ' error
with or without this line
Application.CutCopyMode = False '
error with or without this line
ActiveSheet.ShowDataForm '
produces the error

Application.ScreenUpdating = True

End Sub

I can produce the form manually selecting Data|Form. However, when
trying to add more items, get "cannot extend list or database".

Any ideas?

TIA
doco















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
paste method of worksheet class failed Dwaine Horton[_3_] Excel Programming 7 August 11th 05 07:50 PM
Copy Method of WorkSheet Class Failed! Donna[_7_] Excel Programming 9 February 11th 05 08:47 PM
Copy Method of Worksheet Class Failed Steph[_3_] Excel Programming 2 April 7th 04 01:43 PM
Copy Method of Worksheet Class Failed Steph[_3_] Excel Programming 0 April 5th 04 11:12 PM
Copy Method of Worksheet Class Failed Steph[_3_] Excel Programming 1 April 5th 04 09:56 PM


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