#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 68
Default macros

hi.

how do i make a macro to open up the form...for an excel spreadsheet with
data being entered? I tried making a new macro..then hitting the form
button...
and the macro said activeworksheet.open....I forgot. anyways it came back
with an error on it.

how do i assign the macro to a form button?

thanks!! Merry Christmas
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default macros

How about the DataForm...menu?

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Carrie" wrote in message
...
hi.

how do i make a macro to open up the form...for an excel spreadsheet with
data being entered? I tried making a new macro..then hitting the form
button...
and the macro said activeworksheet.open....I forgot. anyways it came back
with an error on it.

how do i assign the macro to a form button?

thanks!! Merry Christmas



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 68
Default macros

Under Data...I don't see form.

How would I correct the macro??
activesheet.showdataform

has a run time error of 1004...don't understand why it does this.

i'm in 2007 excel.


"Bob Phillips" wrote:

How about the DataForm...menu?

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Carrie" wrote in message
...
hi.

how do i make a macro to open up the form...for an excel spreadsheet with
data being entered? I tried making a new macro..then hitting the form
button...
and the macro said activeworksheet.open....I forgot. anyways it came back
with an error on it.

how do i assign the macro to a form button?

thanks!! Merry Christmas




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default macros

Maybe your data doesn't start in the location excel expects:

http://support.microsoft.com/default...;en-us;q110462
XL: ShowDataForm Method Fails If Data Can't Be Found

You can use code like this if you know (or can determine) the range:

Option Explicit
Sub testme01()
Dim LastRow as Long
Application.DisplayAlerts = False
With activesheet
lastrow = .cells(.rows.count,"A").end(xlup).row
.Range("A4:x" & lastrow).Name = "'" & .Name & "'!database"
.ShowDataForm
End With
Application.DisplayAlerts = True
End Sub

I started in A4 until the last used row in column A, then extended it to columns
A:X of those rows.



Carrie wrote:

Under Data...I don't see form.

How would I correct the macro??
activesheet.showdataform

has a run time error of 1004...don't understand why it does this.

i'm in 2007 excel.

"Bob Phillips" wrote:

How about the DataForm...menu?

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Carrie" wrote in message
...
hi.

how do i make a macro to open up the form...for an excel spreadsheet with
data being entered? I tried making a new macro..then hitting the form
button...
and the macro said activeworksheet.open....I forgot. anyways it came back
with an error on it.

how do i assign the macro to a form button?

thanks!! Merry Christmas





--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 68
Default macros

Hi,

ok, i see the table...except it's all empty. I'm just a beginner...please
be patient.

my column headings for my items is b5 thru f5.
then all the detail will be b6 thru f6....down to bxxxxx to fxxxxxxx

please tell me where to adjust. i had copied the macro
into my spreadsheet.

thanks

"Dave Peterson" wrote:

Maybe your data doesn't start in the location excel expects:

http://support.microsoft.com/default...;en-us;q110462
XL: ShowDataForm Method Fails If Data Can't Be Found

You can use code like this if you know (or can determine) the range:

Option Explicit
Sub testme01()
Dim LastRow as Long
Application.DisplayAlerts = False
With activesheet
lastrow = .cells(.rows.count,"A").end(xlup).row
.Range("A4:x" & lastrow).Name = "'" & .Name & "'!database"
.ShowDataForm
End With
Application.DisplayAlerts = True
End Sub

I started in A4 until the last used row in column A, then extended it to columns
A:X of those rows.



Carrie wrote:

Under Data...I don't see form.

How would I correct the macro??
activesheet.showdataform

has a run time error of 1004...don't understand why it does this.

i'm in 2007 excel.

"Bob Phillips" wrote:

How about the DataForm...menu?

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Carrie" wrote in message
...
hi.

how do i make a macro to open up the form...for an excel spreadsheet with
data being entered? I tried making a new macro..then hitting the form
button...
and the macro said activeworksheet.open....I forgot. anyways it came back
with an error on it.

how do i assign the macro to a form button?

thanks!! Merry Christmas




--

Dave Peterson



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default macros

Your table shouldn't be empty--it has to have headers.

Option Explicit
Sub testme01()
Dim LastRow as Long
Application.DisplayAlerts = False
With activesheet
lastrow = .cells(.rows.count,"B").end(xlup).row
.Range("A5:F" & lastrow).Name = "'" & .Name & "'!database"
.ShowDataForm
End With
Application.DisplayAlerts = True
End Sub



Carrie wrote:

Hi,

ok, i see the table...except it's all empty. I'm just a beginner...please
be patient.

my column headings for my items is b5 thru f5.
then all the detail will be b6 thru f6....down to bxxxxx to fxxxxxxx

please tell me where to adjust. i had copied the macro
into my spreadsheet.

thanks

"Dave Peterson" wrote:

Maybe your data doesn't start in the location excel expects:

http://support.microsoft.com/default...;en-us;q110462
XL: ShowDataForm Method Fails If Data Can't Be Found

You can use code like this if you know (or can determine) the range:

Option Explicit
Sub testme01()
Dim LastRow as Long
Application.DisplayAlerts = False
With activesheet
lastrow = .cells(.rows.count,"A").end(xlup).row
.Range("A4:x" & lastrow).Name = "'" & .Name & "'!database"
.ShowDataForm
End With
Application.DisplayAlerts = True
End Sub

I started in A4 until the last used row in column A, then extended it to columns
A:X of those rows.



Carrie wrote:

Under Data...I don't see form.

How would I correct the macro??
activesheet.showdataform

has a run time error of 1004...don't understand why it does this.

i'm in 2007 excel.

"Bob Phillips" wrote:

How about the DataForm...menu?

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Carrie" wrote in message
...
hi.

how do i make a macro to open up the form...for an excel spreadsheet with
data being entered? I tried making a new macro..then hitting the form
button...
and the macro said activeworksheet.open....I forgot. anyways it came back
with an error on it.

how do i assign the macro to a form button?

thanks!! Merry Christmas




--

Dave Peterson


--

Dave Peterson
  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 230
Default macros

Hi Dave,

I tested this as I could see some use for myself. Hence my comments.....
1. Shouldn't at least one row of data be already entered within the table
range for the data form to appear? When my data area (other than the
headers) was blank, I too got the error 1004 message.
2. I think the range should be B5:F....... otherwise an empty unnecessary
field will appear at the top of the Data form.

Rob

"Dave Peterson" wrote in message
...
Your table shouldn't be empty--it has to have headers.

Option Explicit
Sub testme01()
Dim LastRow as Long
Application.DisplayAlerts = False
With activesheet
lastrow = .cells(.rows.count,"B").end(xlup).row
.Range("A5:F" & lastrow).Name = "'" & .Name & "'!database"
.ShowDataForm
End With
Application.DisplayAlerts = True
End Sub



Carrie wrote:

Hi,

ok, i see the table...except it's all empty. I'm just a
beginner...please
be patient.

my column headings for my items is b5 thru f5.
then all the detail will be b6 thru f6....down to bxxxxx to fxxxxxxx

please tell me where to adjust. i had copied the macro
into my spreadsheet.

thanks

"Dave Peterson" wrote:

Maybe your data doesn't start in the location excel expects:

http://support.microsoft.com/default...;en-us;q110462
XL: ShowDataForm Method Fails If Data Can't Be Found

You can use code like this if you know (or can determine) the range:

Option Explicit
Sub testme01()
Dim LastRow as Long
Application.DisplayAlerts = False
With activesheet
lastrow = .cells(.rows.count,"A").end(xlup).row
.Range("A4:x" & lastrow).Name = "'" & .Name & "'!database"
.ShowDataForm
End With
Application.DisplayAlerts = True
End Sub

I started in A4 until the last used row in column A, then extended it
to columns
A:X of those rows.



Carrie wrote:

Under Data...I don't see form.

How would I correct the macro??
activesheet.showdataform

has a run time error of 1004...don't understand why it does this.

i'm in 2007 excel.

"Bob Phillips" wrote:

How about the DataForm...menu?

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in
my addy)



"Carrie" wrote in message
...
hi.

how do i make a macro to open up the form...for an excel
spreadsheet with
data being entered? I tried making a new macro..then hitting the
form
button...
and the macro said activeworksheet.open....I forgot. anyways it
came back
with an error on it.

how do i assign the macro to a form button?

thanks!! Merry Christmas




--

Dave Peterson


--

Dave Peterson



  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default macros

Thanks for testing.

You're correct. It looks like excel wants at least one line of data. (I
guessed wrong!)

Maybe this would be better:

Option Explicit
Sub testme01()
Dim LastRow As Long
Application.DisplayAlerts = False
With ActiveSheet
LastRow = .Cells(.Rows.Count, "B").End(xlUp).Row
If LastRow = 5 Then
LastRow = 6
End If
.Range("A5:F" & LastRow).Name = "'" & .Name & "'!database"
.ShowDataForm
End With
Application.DisplayAlerts = True
End Sub



RobN wrote:

Hi Dave,

I tested this as I could see some use for myself. Hence my comments.....
1. Shouldn't at least one row of data be already entered within the table
range for the data form to appear? When my data area (other than the
headers) was blank, I too got the error 1004 message.
2. I think the range should be B5:F....... otherwise an empty unnecessary
field will appear at the top of the Data form.

Rob

"Dave Peterson" wrote in message
...
Your table shouldn't be empty--it has to have headers.

Option Explicit
Sub testme01()
Dim LastRow as Long
Application.DisplayAlerts = False
With activesheet
lastrow = .cells(.rows.count,"B").end(xlup).row
.Range("A5:F" & lastrow).Name = "'" & .Name & "'!database"
.ShowDataForm
End With
Application.DisplayAlerts = True
End Sub



Carrie wrote:

Hi,

ok, i see the table...except it's all empty. I'm just a
beginner...please
be patient.

my column headings for my items is b5 thru f5.
then all the detail will be b6 thru f6....down to bxxxxx to fxxxxxxx

please tell me where to adjust. i had copied the macro
into my spreadsheet.

thanks

"Dave Peterson" wrote:

Maybe your data doesn't start in the location excel expects:

http://support.microsoft.com/default...;en-us;q110462
XL: ShowDataForm Method Fails If Data Can't Be Found

You can use code like this if you know (or can determine) the range:

Option Explicit
Sub testme01()
Dim LastRow as Long
Application.DisplayAlerts = False
With activesheet
lastrow = .cells(.rows.count,"A").end(xlup).row
.Range("A4:x" & lastrow).Name = "'" & .Name & "'!database"
.ShowDataForm
End With
Application.DisplayAlerts = True
End Sub

I started in A4 until the last used row in column A, then extended it
to columns
A:X of those rows.



Carrie wrote:

Under Data...I don't see form.

How would I correct the macro??
activesheet.showdataform

has a run time error of 1004...don't understand why it does this.

i'm in 2007 excel.

"Bob Phillips" wrote:

How about the DataForm...menu?

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in
my addy)



"Carrie" wrote in message
...
hi.

how do i make a macro to open up the form...for an excel
spreadsheet with
data being entered? I tried making a new macro..then hitting the
form
button...
and the macro said activeworksheet.open....I forgot. anyways it
came back
with an error on it.

how do i assign the macro to a form button?

thanks!! Merry Christmas




--

Dave Peterson


--

Dave Peterson


--

Dave Peterson
  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default macros

ps. Yep. And that line should have been:

..Range("b5:F" & LastRow).Name = "'" & .Name & "'!database"

(starting in column B)

RobN wrote:

Hi Dave,

I tested this as I could see some use for myself. Hence my comments.....
1. Shouldn't at least one row of data be already entered within the table
range for the data form to appear? When my data area (other than the
headers) was blank, I too got the error 1004 message.
2. I think the range should be B5:F....... otherwise an empty unnecessary
field will appear at the top of the Data form.

Rob

"Dave Peterson" wrote in message
...
Your table shouldn't be empty--it has to have headers.

Option Explicit
Sub testme01()
Dim LastRow as Long
Application.DisplayAlerts = False
With activesheet
lastrow = .cells(.rows.count,"B").end(xlup).row
.Range("A5:F" & lastrow).Name = "'" & .Name & "'!database"
.ShowDataForm
End With
Application.DisplayAlerts = True
End Sub



Carrie wrote:

Hi,

ok, i see the table...except it's all empty. I'm just a
beginner...please
be patient.

my column headings for my items is b5 thru f5.
then all the detail will be b6 thru f6....down to bxxxxx to fxxxxxxx

please tell me where to adjust. i had copied the macro
into my spreadsheet.

thanks

"Dave Peterson" wrote:

Maybe your data doesn't start in the location excel expects:

http://support.microsoft.com/default...;en-us;q110462
XL: ShowDataForm Method Fails If Data Can't Be Found

You can use code like this if you know (or can determine) the range:

Option Explicit
Sub testme01()
Dim LastRow as Long
Application.DisplayAlerts = False
With activesheet
lastrow = .cells(.rows.count,"A").end(xlup).row
.Range("A4:x" & lastrow).Name = "'" & .Name & "'!database"
.ShowDataForm
End With
Application.DisplayAlerts = True
End Sub

I started in A4 until the last used row in column A, then extended it
to columns
A:X of those rows.



Carrie wrote:

Under Data...I don't see form.

How would I correct the macro??
activesheet.showdataform

has a run time error of 1004...don't understand why it does this.

i'm in 2007 excel.

"Bob Phillips" wrote:

How about the DataForm...menu?

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in
my addy)



"Carrie" wrote in message
...
hi.

how do i make a macro to open up the form...for an excel
spreadsheet with
data being entered? I tried making a new macro..then hitting the
form
button...
and the macro said activeworksheet.open....I forgot. anyways it
came back
with an error on it.

how do i assign the macro to a form button?

thanks!! Merry Christmas




--

Dave Peterson


--

Dave Peterson


--

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
Macros warning always shows up, even if all macros removed Joe M Excel Discussion (Misc queries) 1 December 20th 07 04:45 AM
Macros - copying macros from one computer to another TT Excel Discussion (Misc queries) 18 December 14th 06 03:24 AM
"openinf file..."ENABLE MACROS...DISABLE MACROS" F. Lawrence Kulchar Excel Discussion (Misc queries) 3 September 12th 06 10:33 AM
macros Anthony Excel Worksheet Functions 2 February 21st 06 10:57 AM
Training: More on how to use macros in Excel: Recording Macros ToriT Excel Worksheet Functions 2 February 10th 06 07:05 PM


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