i have a project in which we have a database as backend and excel as front end in it first we allow user to access the data of MS Access in excel and update it then we get it saved at some place. now administrator needs help that he wants a prompt every time for the changes that have been made in data...
How to show a promt for any change detected in excel sheet
Collapse
X
-
Tags: None
-
There are some methods to do this after any events :
Code:DoCmd.RunCommand acCmdSaveRecord
Code:DoCmd.Save acTable, "TabelName"
Code:DoCmd.RunCommand acCmdRefresh
Best Regards,
Ahmed Tharwat (Medo) -
Thanx for ur help
But can u make it more clear. I am new to VB. I also need some suggestion for the case that if we have to copy any excel sheet into another excel sheet of one workbook to another...Comment
-
what i understand, you have a excel file linked with ms access and you need after any change in ms access are changed in excel. is that true?
if yes:
The above code is the correct answer for that ,
just you can make event after you exit from the record
in after update event but the code
Code:DoCmd.RunCommand acCmdSaveRecord . DoCmd.RunCommand acCmdRefresh
Code:DoCmd.Save acTable, "TabelName" DoCmd.RunCommand acCmdRefresh
You can attach the example and explain what do you need.
Best Regards,
(Medo)Comment
-
Thanx for these solutions sir,
But i just want to copy content of one excel sheet to another new excel sheet then the administrator will do the rest so tell me how i can copy content of one sheet to anotherComment
-
you can use this code from excel vba editor
Code:Sub CopySheet() Application.ScreenUpdating = False Workbooks("Book2").Sheets.Add.Name = "Copied" Cells.Copy Workbooks("Book2").Sheets("Copied").Range("A1").PasteSpecial ActiveSheet.DrawingObjects.Copy Workbooks("Book2").Activate ActiveSheet.Paste ActiveSheet.Cells.Copy Range("A1").PasteSpecial xlPasteValues ThisWorkbook.Activate Application.CutCopyMode = False Application.ScreenUpdating = True End Sub
attach the sample to understand what do you need.
i`m very sorry my english is very bad.Comment
-
Comment