100% stuck VBA send sheets - DESPERATE for help

jamesmev

Board Regular
Joined
Apr 9, 2015
Messages
233
Office Version
  1. 365
Platform
  1. Windows
I have a workbook that has 7 sheets. I am looking for a method to send each sheet to a different location with one button. Only if there is data on the sheet. Example
Sheets1-2-3-4 have data in a given range and 5-6-7 do not have any data in that same range sheets 1-2-3-4 will be sent to their designated recipient. 5-6-7 will not be sent.
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
I've tried adding a if/else statement. This kills all actions which does not allow any sheet to send.

Code:
[FONT=Calibri][SIZE=3][COLOR=#000000]Dim celltxt As String[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000]celltxt = ActiveSheet.Range("A2").Text[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000]If InStr(1, celltxt, "5200") Then[/COLOR][/SIZE][/FONT]

from there I have the vba to send the sheet.
At the end I have an Else Statement.
 
Upvote 0

Forum statistics

Threads
1,226,735
Messages
6,192,733
Members
453,752
Latest member
Austin2222

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top