Call_Database_Form Code. Please Help!

  • Thread starter Thread starter MikeRoff
  • Start date Start date
M

MikeRoff

Hi there,
I am currently attempting to produce a working program for my AS ICT
project but have come into difficulty with one thing.

I am trying to produce a Macro that brings up the database form so that
I can enter a Customers information.

After some short research, I have discovered that with the code I am
currently using, it must be in the first cell with no colour or
anything.
Is there another code I can use in order to have this appear in another
cell?
This is the code I am currently using:

Sub InputDate()
'
' InputData Macro
' Macro recorded 10/12/2003 by 33021
'
' Keyboard Shortcut: Ctrl+Shift+I
'
'
'Sub Call_Database_Form()
Sheets("Bookings").Select
Range("A2").Select
'Call the data form
ActiveSheet.ShowDataForm
End Sub

It works fine, but as I said does not work If i try to move it to
another cell or add colour.

Any help would be much appreciated.
Thank you very much and thanks for the great forums.
Look forward to hearing from someone.

Josh Walker
 
Hi Josh,

Sub ShowMyDataForm()
Dim mysheet As Worksheet
Set mysheet = Sheets("Bookings")
With mysheet
.Select
.Range("A2").CurrentRegion.Name = .Name & "!Database"
'Call the data form
.ShowDataForm
End With
End Sub

Regards,
Shah Shailesh
http://members.lycos.co.uk/shahweb/
(Excel Add-ins)
 
Back
Top