Checking if another Worksheet is opened and its opening or closing

Sometime we have to call another Worksheet to get some data. Thanks to this code we could check if data source file is opened or closed.

In my case file couldn’t be open because a copy of file had to be created but under other name. When file was open during file copying an error occurred. Unfortunately I didn’t remember code source site.

Sub CheckOpen()

Dim Ret
Dim FolderPath As String

FolderPath = "Folder path where source files is located"

Ret = IsWorkBookOpen(FolderPath & "\FileName.xlsx")
If Ret = True Then
    ' Worksheet is opened - close without save changes
    Windows("FileName.xlsx").Close SaveChanges:=False
    Debug.Print "File has been closed" ' to be removed
    ' Nothing happened - FileName.xlsx is closed
    Debug.Print "File is closed." ' to be removed
End If

' FileName.xlsx copying and create FileName2.xlsx
FileCopy FolderPath & "\FileName.xlsx", FolderPath & "\FileName2.xlsx"
' FileName2.xlsx opening 
Workbooks.Open FileName:=FolderPath & "\FileName2.xlsx"

End Sub

404 thoughts on “Checking if another Worksheet is opened and its opening or closing

  1. Pingback: trang web đánh lô đề uy tín

  2. Pingback: buy psychadelic pills blotter tab dmt lsd ayahuasca online overnight cheap

  3. Pingback: Pi News Wire

  4. Pingback: cach bat de kep

  5. Pingback: choi game poker

  6. Pingback: UNICC SHOP

  7. Pingback: the natural penguin (TNP)

  8. Pingback: asik qq

  9. Pingback:

  10. Pingback: order generic morphine without prescription online pharmacy cheap

  11. Pingback: immediate edge

  12. Pingback: mature sex dolls

  13. Pingback: Immediate Edge

  14. Pingback: bitcoin loophole review

  15. Pingback:

  16. Pingback: mơ thấy tiền đánh con gì

  17. Pingback: mơ thấy con cá đánh đề con gì

  18. Pingback: Bichon Frise Puppies

  19. Pingback: Teacup pomeranians for Sale

  20. Pingback: Buy guns online

  21. Pingback: vang la so may trong so de

  22. Pingback: Sex dolls for sale

  23. Pingback: Panzer Arms BP-12

  24. Pingback: mơ thấy bị bắn

  25. Pingback: mơ thấy người chết đuối danh con gi

  26. Pingback: con cóc số mấy

  27. Pingback: mơ thấy gặt lúa

  28. Pingback: mơ thấy vợ cũ

  29. Pingback: cung kim ngưu nữ hợp với cung nào

  30. Pingback: tính cách cung bảo bình nữ

  31. Pingback: con trai song ngư thích con gái như thế nào

  32. Pingback: giải mã giấc mơ thấy người yêu cũ

  33. Pingback: Quality Engineering Consulting services

  34. Pingback: mơ trả nợ đánh con gì

  35. Pingback: Gym workout music 2020

  36. Pingback: nằm mơ thấy đi chùa

  37. Pingback: tennis truc tuyen

  38. Pingback: tai game ban ca an xu crack

  39. Pingback: game danh bai online nhieu nguoi choi nhat

  40. Pingback: tai game dua ngua

  41. Pingback: mơ thấy chảy máu tay

  42. Pingback: mix estate 2021

  43. Pingback: mơ thấy bàn thờ tổ tiên

  44. Pingback: house music music

  45. Pingback: buy levitra online cheap

  46. Pingback: mơ thấy cơm trắng

  47. Pingback: mơ thấy chùa

  48. Pingback: mơ ăn chuối

  49. Pingback: bốc mộ thấy rắn

  50. Pingback: mơ rụng tóc đánh con gì

  51. Pingback: brazilian cialis

  52. Pingback: cialis et fertilite

  53. Pingback: sildenafil walgreens

  54. Pingback: cialis for sale

  55. Pingback: generic cialis canadian

  56. Pingback: buy cialis united kingdom

  57. Pingback: buy cialis drug

  58. Pingback: original cialis low price

  59. Pingback: cialis original for sale

  60. Pingback: how to get ciails without a doctor

  61. Pingback: where can u buy cialis

  62. Pingback: zpmvhlun

  63. Pingback: buy cialis online overnight

  64. Pingback: how much viagra can i take in 24 hours

  65. Pingback: viagra wanneer innemen

  66. Pingback: what dosage should zithromax be for sinus infection

  67. Pingback: cheapest procurement of sildenafil

  68. Pingback: cialis dosage 20mg

  69. Pingback: order viagra

  70. Pingback: can i buy cialis online

  71. Pingback: buy cialis united kingdom

  72. Pingback: cialis 20mg low price

  73. Pingback: viagra

  74. Pingback: cheap writing service

  75. Pingback: how to write a research design

  76. Pingback: essay writing my ideal teacher

  77. Pingback: help me wityh my essay online

  78. Pingback: ethics and social responsibility in business essay

  79. Pingback: sophia viagra bikini

  80. Pingback: can i buy cialis online

  81. Pingback: amoxicillin 500 mg pill

  82. Pingback: furosemide 20mg tablets cost

  83. Pingback: azithromycin 1000mg tablets

  84. Pingback: ivermectin 500mg

  85. Pingback: albuterol 2.5 mg

  86. Pingback: doxycycline for staph

  87. Pingback: prednisolone manufacturers

  88. Pingback: clomid days

  89. Pingback: priligy amazon

  90. Pingback: diflucan birth control

  91. Pingback: synthroid pill doses

  92. Pingback: before after propecia

  93. Pingback: neurontin webmd

  94. Pingback: metformin brand name

  95. Pingback: paxil generic names

  96. Pingback: plaquenil copay card

  97. Pingback: reliable online pharmacy cialis

  98. Pingback: sildenafil 20 mg online canada

  99. Pingback: viagra achat sildenafil

  100. Pingback: cialis 100mg for sale

  101. Pingback: viagra pill cheap

  102. Pingback: generic viagra 200

  103. Pingback: is amoxicillin

  104. Pingback: keflex vs amoxicillin

  105. Pingback: medication azithromycin

  106. Pingback: celebrex arrhythmia

  107. Pingback: instaflex vs celebrex

  108. Pingback: hybridization for carbons in keflex

  109. Pingback: how long should keflex be used for

  110. Pingback: duloxetine 60 mg

  111. Pingback: duloxetine withdrawal

  112. Pingback: vardenafil vs sildenafil citrate

  113. Pingback: cialis generic from india

  114. Pingback: best generic levitra

  115. Pingback: best metformin brand

  116. Pingback: buy generic cialis online with paypal

  117. Pingback: how to get real cialis online

  118. Pingback: sildenafil 20 mg mexico

  119. Pingback: ivy secrect viagra mix up

  120. Pingback: real cialis for sale

  121. Pingback: tadalafil generic mexico

  122. Pingback: cialis 500mg

  123. Pingback: canadian viagra

  124. Pingback: sildenafil 50 mg buy online india

  125. Pingback: buy levitra online south africa

  126. Pingback: snorting cialis australia

  127. Pingback: sildenafil price in mexico

  128. Pingback: viagra fuck australia

  129. Pingback: finasteride for hair loss

  130. Pingback: price for viagra 100mg

  131. Pingback: comprar sildenafilo 100 mg

  132. Pingback: sildenafil 50 mg buy online

  133. Pingback: sildenafil generic 50 mg

  134. Pingback: cheap cialis for sale

  135. Pingback: sildenafil citrate side effects

  136. Pingback: generic viagra reviews australia

  137. Pingback: cialis reviews reddit australia

  138. Pingback: buy generic cialis india

  139. Pingback: viagra acheter amazon

  140. Pingback: cialis cost in mexico

  141. Pingback: fastest delivery of generic cialis

  142. Pingback: male erection pills

  143. Pingback: online ed pills

  144. Pingback: best rated canadian pharmacy

  145. Pingback: buy cialis tadalafil uk

  146. Pingback: pill pharmacy

  147. Pingback: buy cheap cialis uk

  148. Pingback: cialis without presciption in usa

  149. Pingback: payday usa loans

  150. Pingback: levitra retinitis pigmentosa

  151. Pingback: Tinder Matches But No Messages

  152. Pingback: faxless payday loans davenport

  153. Pingback: how long does viagra stay in your system

  154. Pingback: 20mg low price

  155. Pingback: zestril generic

  156. Pingback: free online dating sites with no blockings

  157. Pingback: where can i buy cialis over the counter

  158. Pingback: buy ativan in canada

  159. Pingback: generic cialis express delivery

  160. Pingback: cialis patent expiration date us

  161. Pingback: canadian pharmacy without a prescription

  162. Pingback: product team cialis getting ready to market

  163. Pingback: buy cialis tadalafil uk

  164. Pingback: canadian pharmacy no scripts

  165. Pingback: cut cialis in half

  166. Pingback: contrave canadian pharmacy

  167. Pingback: buy cialis online europe

  168. Pingback: buy cialis rush

  169. Pingback: cialis 20mg low price

  170. Pingback: treatments for ed

  171. Pingback: canada cialis

  172. Pingback: valtrex 500 india

  173. Pingback: viagra wiki

  174. Pingback: new treatments for ed

  175. Pingback: purchasing cialis

  176. Pingback: sildenafil 100mg usa

  177. Pingback: cialis dapoxetine

  178. Pingback: real generic viagra

  179. Pingback: cialis strength

  180. Pingback: viagra sample

  181. Pingback: viagra without a doctor prescription

  182. Pingback: tadalafil dosage recommendations

  183. Pingback: canadian pharmacy viagra

  184. Pingback:

  185. Pingback: diclofenac generic

  186. Pingback: drugs to treat ed

  187. Pingback: prednisone 5 mg from mexico

  188. Pingback: hydroxychloroquine cost without insurance

  189. Pingback: ivermectin generic name

  190. Pingback: dapoxetine 30 mg tablet price in india

  191. Pingback: free dating men

  192. Pingback: cialis with dapoxetine

  193. Pingback: buy stromectol canada

  194. Pingback: aciclovir

  195. Pingback: plaquenil hydroxychloroquine

  196. Pingback: ivermectin tablets uk

  197. Pingback: ivermectin 3

  198. Pingback: hydroxychloroquine use in florida

  199. Pingback: erection pills online

  200. Pingback: hydroxychloroquine acr pdf

  201. Pingback: canadian drug

  202. Thanks a lot for sharing this with all of us you really
    realize what you’re talking about! Bookmarked.
    Please additionally seek advice from my website =).
    We may have a hyperlink alternate arrangement between us

    click here=풀싸롱

  203. Pingback: when will viagra be generic

  204. Pingback: generic cialis canadian

  205. Pingback: buy cialis united kingdom

  206. Pingback: buy hydroxychloroquine over the counter

  207. Pingback: where to buy hydroxychloroquine over the counter

  208. Pingback: buy plaquenil uk

  209. Pingback: trump stops taking hydroxychloroquine

  210. Pingback: how much is cialis without insurance?

  211. Pingback: cialis and grapefruit enhance

  212. Pingback: how much does the military spend on viagra

  213. Pingback: viagra for sale overnight

  214. Pingback: pain meds online without doctor prescription

  215. Pingback: purchase zithromax z-pak

  216. Pingback: toronto pharmacy online

  217. Pingback: viagra how to use the first time

  218. Pingback: get viagra prescribed online

  219. Pingback: best canadian pharmacy reviews

  220. Pingback:

  221. Pingback: ivermectil with stromectol generic usa

  222. Pingback: stromectol drug

  223. Pingback: ed drugs over the counter

  224. Pingback: legal to buy prescription drugs from canada

  225. Pingback: ivermectin for skin infection

  226. Pingback: plaquenil depression

  227. Pingback: free cialis samples canada

  228. Pingback: mastercard generic cialis

  229. Pingback: bph dapoxetine

  230. Pingback: prednisone tablets

  231. Pingback: hcq 375

  232. Pingback: amlodipine besylate 2.5 mg tablet

  233. Pingback: atorvastatin calcium tablets.20mg

  234. Pingback: does prilosec cause constipation

  235. Pingback: prozac drug interactions

  236. Pingback: quetiapine side effects nhs

  237. Pingback: is escitalopram an anticholinergic

  238. Pingback: best canadian mail order pharmacies

  239. Pingback: cymbalta picture

  240. Pingback: buy viagra

  241. Pingback: hydrochlorothiazide cost walmart

  242. Pingback: ivermectin 250ml

  243. Pingback: ivermectin lotion

  244. Pingback: sildenafil 50 mg

  245. Pingback: can you just stop taking atorvastatin?

  246. Pingback: generic viagra online pharmacy

  247. Pingback: what is sertraline 100mg

  248. Pingback:

  249. Pingback: buy sildenafil

  250. Pingback: drug medication

  251. Pingback: cialis tadalafil 10mg tablets

  252. Pingback: pharmacy medications

  253. Pingback: cialis official website

  254. Pingback: order generic cialis online

  255. Pingback: escitalopram para que se usa

  256. Pingback: tadalafil cialis 5mg

  257. Pingback: viagra online generic

  258. Pingback: ivermectin 6 price

  259. Pingback: buy generic viagra online

  260. Pingback: how old do you have to be to buy viagra

  261. Pingback: how fast does cymbalta work for pain

  262. Pingback: 1

  263. Pingback: viagra alternatives

  264. Pingback: where can i get cialis online

  265. Pingback: buy soft viagra

  266. Pingback: buy sildenafil online

  267. Pingback: viagra fast shipping

  268. Pingback: viagra online quick delivery

  269. Pingback: tadalafil otc

  270. Pingback: generic viagra online canadian pharmacy

  271. Pingback: sildenafil 20mg

  272. Pingback: ivermectin 9 mg

  273. Pingback: where to buy cialis pills

  274. Pingback: ivermectin humans

  275. Pingback: where can i buy prednisone online

  276. Pingback: buy generic doxycycline

  277. Pingback: viagra online canada

  278. Pingback: doxycycline 100mg price

  279. Pingback: doxycycline mono

  280. Pingback: buy cialis gel

  281. Pingback: buy sildenafil 20 mg

  282. Pingback: warnings for ivermectin

  283. Pingback: stromectol same as penicillin

  284. Pingback: generic cialis (tadalafil) 20mg 30

  285. Pingback: where to get free samples of cialis

  286. Pingback: cheap real viagra canada

  287. Pingback: ivermectin pills for scabies treatment

  288. Pingback: cialis prices walmart

  289. Pingback: cost of 50mg viagra in canada

  290. Pingback: stromectol online without prescription

  291. Pingback: herbal cialis

  292. Pingback: ivermectin uk

  293. Pingback: 1% ivermectin

  294. Pingback: official cialis website

  295. Pingback: how to use ivermectin for dogs

  296. Pingback: ivermectin for covid treatment

  297. Pingback: female viagra for sale in india

  298. Pingback: buy viagra on discover card

  299. Pingback: does walmart have female viagra

  300. Pingback: ivermectin pour on for horses

  301. Pingback: ivermectin side effects in humans

  302. Pingback: female viagra ambien and warning

  303. Pingback: ivermectin and alcohol

  304. Pingback: slipped female viagra to her

  305. Pingback: cialis dapoxetine

  306. Pingback: liquid tadalafil citrate

  307. Pingback: cialis

  308. Pingback: viagra chicago buy

  309. Pingback: viagra online

  310. Pingback: medication online

  311. Pingback: viagra walmart

  312. Pingback: where to buy sildenafil

  313. Pingback: drug pharmacy

  314. Pingback: cheapest viagra

  315. Pingback: erfahrungen mit priligy generika dapoxetine

  316. Pingback: cheap viagra for sale in the uk

  317. Pingback: cheap viagra no prescription uk

  318. Pingback: tamoxifen endometrium

  319. Pingback: nolvadex pills

  320. Pingback: does tamoxifen make you tired

  321. Pingback: 1 mg prednisone daily

  322. Pingback: buy prednisone online fast shipping

  323. Pingback: where can i buy prednisone without prescription

  324. Pingback: ivermectin 4

  325. Pingback: ivermectin cream cost

  326. Pingback: ivermectin cream 5%

  327. Pingback: over the counter chlamydia treatment cvs

  328. Pingback: cheap viagra online

  329. Pingback: best canadian pharmacy online

  330. Pingback: canadian medications

  331. Pingback: azithromycin 250 mg over the counter

  332. Pingback: buy viagra manila

  333. Pingback: prescription meds without the prescriptions

  334. Pingback: over the counter viagra

  335. Pingback: viagra no prior prescription

  336. Pingback: buy prednisone canadian pharmacy

  337. Pingback: order prednisone from canada

  338. Pingback: do i need a prescription for viagra

  339. Pingback: viagra foods

  340. Pingback: walmart viagra

  341. Pingback: stromectol pill

  342. Pingback: cvs amoxicillin price

  343. Pingback: viagra online

  344. Pingback: buy furosemide 100 mg

  345. Pingback: neurontin 10 mg

  346. Pingback: viagra from canada

  347. Pingback: online poker gambling us

  348. Pingback: hydroxychloroquine 2

  349. Pingback: buy 10 mg prednisone

  350. Pingback: cialis viagra

  351. Pingback: where to buy priligy

  352. Pingback: provigil pill

  353. Pingback: ivermectin stromectol

  354. Pingback: albuterol tablets

  355. Pingback: viagra 100mg

  356. Pingback: buy generic zithromax

  357. Pingback: lasix in mexico

  358. Pingback: viagra substitute

  359. Pingback: cost for viagra

  360. Pingback: dapoxetine approval

  361. Pingback: wher eto buy provigil

  362. Pingback: womens viagra

  363. Pingback: cheap online viagra

  364. Pingback: valtrex 500 mg daily

  365. Pingback: valtrex 1g best price

  366. Pingback: order generic valtrex online

  367. Pingback: valtrex over counter

  368. Pingback: female viagra pill

  369. Pingback: viagra generic

  370. Pingback: viagra or cialis

  371. Pingback: cheap generic drugs from canada

  372. Pingback: generic ed pills from canada

  373. Pingback: dragon ball super sex games

  374. Pingback: cheap online generic drugs

  375. Pingback: cialis dosage frequency

  376. Pingback: cialis medication

  377. Pingback: cialis side effects dangers

  378. Pingback: standard dose of cialis

  379. Pingback: prices for plaquenil

  380. Pingback: plaquenil

  381. Pingback: sildenafil tablets

  382. Pingback: hydroxychloroquine 300 mg tablet

  383. Pingback: viagra pills

  384. Pingback: stromectol tablet 3 mg

  385. Pingback: ivermectin 3mg tablets price

  386. Pingback: plaquenil osteoarthritis

  387. Pingback: ivermectin rx

  388. Pingback: ivermectin 1 cream generic

  389. Pingback: ivermectin new zealand

  390. Pingback: cialis & viagra

  391. Pingback: cialis using paypal in australia

  392. Pingback: best ed treatment

  393. Pingback: pills for ed

  394. Pingback: ivermectin generic name

  395. Pingback: ivermectin cream canada cost

  396. Pingback: Lincocin

  397. Pingback: viagra canada

  398. Pingback: craigslist cialis

  399. Pingback: cialis 25mg canada

  400. Pingback: prescription without a doctor's prescription

  401. Pingback: where can i get viagra

  402. Pingback: cialis dosage recommend

  403. Pingback: canadian pharmacy online canada

  404. Pingback: Cialis Oral Jelly (Orange)

Leave a Reply

Your email address will not be published. Required fields are marked *