Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have two spreadsheet's. Test1.xls which is on my C:
Drive and another spreadsheet Test2.xls which is on my H: Drive both spreadsheets are in a file called temp. The spreadsheet on my C: Drive contains a user form that the user completes and then clicks on a button. I want that information to be put on the spreadsheet on my H:\ drive. For example I have a field on the form that the user inserts the date (txtdate) when they click on a macro I want it to take the date off the user form and insert it into cell A2 on spreadsheet H:\temp\test2.xls. I have asked before but nothing seems to work........ |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Glenn,
Didn't test it, but it must work : You supposed to have a "Save" button on the form. Put this code in its Click event : Dim wbHDrive as Workbook If Me.txtdate.value<"" And Not IsNull(Me.txtdate) then Application.ScreenUpdating = False set wbHDrive = Workbooks.Open("H:\temp\test2.xls") With wbHDrive ..ActiveSheet.Range("A2") = Me.txtdate.Value ..Close True end with Application.ScreenUpdating = True end if --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Glenn,
Straight off the top, in the C: file userform code Workbooks.Open Filename:="H:\temp\test2.xls" With Activeworkbook .Worksheets("Sheet1").Range("A2").Value = txtDate.Text .Save .Close End With -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Glenn" wrote in message ... I have two spreadsheet's. Test1.xls which is on my C: Drive and another spreadsheet Test2.xls which is on my H: Drive both spreadsheets are in a file called temp. The spreadsheet on my C: Drive contains a user form that the user completes and then clicks on a button. I want that information to be put on the spreadsheet on my H:\ drive. For example I have a field on the form that the user inserts the date (txtdate) when they click on a macro I want it to take the date off the user form and insert it into cell A2 on spreadsheet H:\temp\test2.xls. I have asked before but nothing seems to work........ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
excel form. Need data extracted to spreadsheet each time a form co | Excel Discussion (Misc queries) | |||
User Form Info | Excel Discussion (Misc queries) | |||
How do I type info on a ceated form | New Users to Excel | |||
Can I create a form to run off of info saved on Excel 97? | Charts and Charting in Excel | |||
Adding info onto a "permanent" form | Excel Worksheet Functions |