kallabungo
New Member
- Joined
- Aug 13, 2013
- Messages
- 17
Hi all, i'm having a problem trying to use my existing macro coding to work across multiple computers accessing the same files hosted on Dropbox.
Currently I have created macros that will generate consecutive invoice numbers and then export the file as a PDF to a destination file with a prefix before the invoice number, which has worked flawlessly for years.
Now, I need to relocate these files to Dropbox so that multiple users can access from different computers. I have no doubts that the coding required in this is very simple but I have little to no knowledge of VBA and really need some help from someone that knows more than me.
So, this is the code that I am currently using.
Sub NextInvoice()
Range("H13").Value = Range("H13").Value + 1
Range("B24:H43, H15").ClearContents
End Sub
Sub SaveInvWithNewName()
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\Users\East Point Metals.DESKTOP-HFIK217\Dropbox\Invoicing\Credit Notes\Crn" & Range("H13").Value & ".PDF", Quality:= _
xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _
OpenAfterPublish:=False
NextInvoice
End Sub
Now the problem im experiencing is related to this;
C:\Users\Stuart\Dropbox\Invoicing\Credit Notes
C:\Users\Home\Dropbox\Invoicing\Credit Notes
These are 2 other folder paths from the other computers accessing these files. I've done some hard research and manipulation of code but cannot get it to work.
Ideally I'm looking for some coding that will pull the correct folder path off the current users computer and will insert it before the \Dropbox\Invoicing\Credit Notes so everything goes where it should.
Really appreciate any help that may be received.
Currently I have created macros that will generate consecutive invoice numbers and then export the file as a PDF to a destination file with a prefix before the invoice number, which has worked flawlessly for years.
Now, I need to relocate these files to Dropbox so that multiple users can access from different computers. I have no doubts that the coding required in this is very simple but I have little to no knowledge of VBA and really need some help from someone that knows more than me.
So, this is the code that I am currently using.
Sub NextInvoice()
Range("H13").Value = Range("H13").Value + 1
Range("B24:H43, H15").ClearContents
End Sub
Sub SaveInvWithNewName()
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\Users\East Point Metals.DESKTOP-HFIK217\Dropbox\Invoicing\Credit Notes\Crn" & Range("H13").Value & ".PDF", Quality:= _
xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _
OpenAfterPublish:=False
NextInvoice
End Sub
Now the problem im experiencing is related to this;
C:\Users\Stuart\Dropbox\Invoicing\Credit Notes
C:\Users\Home\Dropbox\Invoicing\Credit Notes
These are 2 other folder paths from the other computers accessing these files. I've done some hard research and manipulation of code but cannot get it to work.
Ideally I'm looking for some coding that will pull the correct folder path off the current users computer and will insert it before the \Dropbox\Invoicing\Credit Notes so everything goes where it should.
Really appreciate any help that may be received.