Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi again,
when the user exits my workbook I want some code to check and see if the data on the worksheet (data entered in range A7:O100) has already been added to the 'database' (a worksheet named database). If it hasn't then add aLL the data then show a msg box stating -data copied to database please save and close programe again- If it has then close save and close the programme any help apreciated many thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It kind of sounds like you could use that same code that checks before it
copies. But this time, if you don't see a match, you issue the warning (instead of warning if you do find a match). Anthony wrote: Hi again, when the user exits my workbook I want some code to check and see if the data on the worksheet (data entered in range A7:O100) has already been added to the 'database' (a worksheet named database). If it hasn't then add aLL the data then show a msg box stating -data copied to database please save and close programe again- If it has then close save and close the programme any help apreciated many thanks -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dave,
sorry, but any chance of some code???? wouldn't know where to start - apart from Sub marco_test End sub Thanks again "Dave Peterson" wrote: It kind of sounds like you could use that same code that checks before it copies. But this time, if you don't see a match, you issue the warning (instead of warning if you do find a match). Anthony wrote: Hi again, when the user exits my workbook I want some code to check and see if the data on the worksheet (data entered in range A7:O100) has already been added to the 'database' (a worksheet named database). If it hasn't then add aLL the data then show a msg box stating -data copied to database please save and close programe again- If it has then close save and close the programme any help apreciated many thanks -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would think your code would be almost identical to the other code...
But this... If FoundAGroupMatch = True Then MsgBox "This log has already been copied to the database", _ vbExclamation 'exit sub '???? '... would change If FoundAGroupMatch = True Then 'already there else msgbox "the data ain't there yet." end if Anthony wrote: Dave, sorry, but any chance of some code???? wouldn't know where to start - apart from Sub marco_test End sub Thanks again "Dave Peterson" wrote: It kind of sounds like you could use that same code that checks before it copies. But this time, if you don't see a match, you issue the warning (instead of warning if you do find a match). Anthony wrote: Hi again, when the user exits my workbook I want some code to check and see if the data on the worksheet (data entered in range A7:O100) has already been added to the 'database' (a worksheet named database). If it hasn't then add aLL the data then show a msg box stating -data copied to database please save and close programe again- If it has then close save and close the programme any help apreciated many thanks -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
split post code (zip code) out of cell that includes full address | Excel Discussion (Misc queries) | |||
Drop Down/List w/Code and Definition, only code entered when selec | Excel Worksheet Functions | |||
Create a newworksheet with VBA code and put VBA code in the new worksheet module | Excel Programming | |||
stubborn Excel crash when editing code with code, one solution | Excel Programming | |||
VBA code delete code but ask for password and unlock VBA protection | Excel Programming |