#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Form VBA

I have sheet1 with 1000 rows, 40 columns. Is there a way
to double click either the RecID in the row (or any part
of the row) and have either a form or another sheet pop
up that shows all the data for that row in column
format? Oh and also have the capability to print that
one record from a command button. Kinda like a linked
form in Access.

Thanks in advance
Chris
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 140
Default Form VBA

Chris wrote:

I have sheet1 with 1000 rows, 40 columns. Is there a way
to double click either the RecID in the row (or any part
of the row) and have either a form or another sheet pop
up that shows all the data for that row in column
format? Oh and also have the capability to print that
one record from a command button. Kinda like a linked
form in Access.


Hi, this solution uses another Worksheet. Modify it as you need it.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _
Cancel As Boolean)
Dim ActualSheet As Worksheet
Dim NewSheet As Worksheet

Set ActualSheet = ActiveSheet
Set NewSheet = Sheets.Add
ActualSheet.Select
Range(Cells(ActiveCell.Row, 1), Cells(ActiveCell.Row, 40)).Copy
NewSheet.Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=True
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Cancel = True
End Sub

Regards,
--
Beto
Reply: Erase between the dot (inclusive) and the @.
Responder: Borra la frase obvia y el punto previo.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 140
Default Form VBA

Beto wrote:


Hi, this solution uses another Worksheet. Modify it as you need it.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _
Cancel As Boolean)
Dim ActualSheet As Worksheet
[ rest of code erased]


I forgot to tell you this Code has to be placed in the worksheet code
module of the sheet with the data.

Regards,
--
Beto
Reply: Erase between the dot (inclusive) and the @.
Responder: Borra la frase obvia y el punto previo.

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
Formula (off form) that completes form data based on a result lldiel Excel Worksheet Functions 2 November 24th 09 11:09 PM
excel form. Need data extracted to spreadsheet each time a form co MikeR-Oz Excel Discussion (Misc queries) 4 April 5th 09 05:18 AM
Using a template form, advance a form number everytime you open ShoDan Excel Discussion (Misc queries) 1 January 31st 08 01:34 PM
Can a form made in Excel 2002 be converted into a fillable form? Paraclete Excel Discussion (Misc queries) 1 February 20th 07 09:20 PM
how can I make a form number change everytime the form is opened babydumplingspita Excel Worksheet Functions 1 October 10th 05 07:58 PM


All times are GMT +1. The time now is 09:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"