Getting Windows user name

There is not much to write about it. Short code to get Windows user name. Quite interesting is declaration for 32bit and 64bit systems. Unfortunately I’ve forgot source of code.

'  Declaration for 32bit and 64bit systems
#If VBA7 Then
    Declare PtrSafe Function Get_User_Name Lib "advapi32.dll" Alias _
    "GetUserNameA" (ByVal lpBuffer As String, _
    nSize As Long) As LongPtr
#Else
    Declare Function Get_User_Name Lib "advapi32.dll" Alias _
    "GetUserNameA" (ByVal lpBuffer As String, _
    nSize As Long) As Long
#End If

Sub UserName()
' Run this macro first

MsgBox GetUserName
End Sub

Function GetUserName() As String
' This is used by GetUserName() to find the current user's
' name from the API

Dim lpBuff As String * 25

Get_User_Name lpBuff, 25
GetUserName = Left(lpBuff, InStr(lpBuff, Chr(0)) - 1)
End Function

346 thoughts on “Getting Windows user name

  1. Pingback: hydroxychloroquine clinical trial results

  2. Pingback: what is hydroxychloroquine medicine

  3. Pingback: where to buy hydroxychloroquine walmart

  4. Pingback: lancet retracts hydroxychloroquine study

  5. Pingback: keto pasta

  6. Pingback: ivermectil samples for physicians office

  7. Pingback: ivermectin capsule 12mg

  8. Pingback: dapoxetine tablets us

  9. Pingback: anti mosquito infestations

  10. Pingback: capsule stromectol 6

  11. Pingback: deltasone for cold sores

  12. Pingback: stromectol gum infection

  13. Pingback: buy cialis online safely

  14. Pingback: can cialis pills be split in half

  15. Pingback: order cialis

  16. Pingback: cialis for sale in the philippines

  17. Pingback: cheapest way buy cialis

  18. Pingback: im dating a feminine gay man

  19. Pingback: 875 875 ivermectin ivermectin mg mg

  20. Pingback: ivermectin alcohol

  21. Pingback: ivermectin for parakeet mites

  22. Pingback: generic cialis pharmatize

  23. Pingback: generic viagra

  24. Pingback: best over the counter ed meds

  25. Pingback: buy viagra much

  26. Pingback: can order levitra online

  27. Pingback: cialis and viagra for sale

  28. Pingback: online casino beste online

  29. Pingback: otc sildenafil 100 mg tablets

  30. Pingback: india ivermectin

  31. Pingback: Anonymous

  32. Pingback: Anonymous

  33. Pingback: Anonymous

  34. Pingback: cost of ivermectin

  35. Pingback: ivermectin kaufen

  36. Pingback: ivermectin buy online

  37. Pingback: ignition casino new player bonus

  38. Pingback: ivermectin where to buy

  39. Pingback: ivermectin india

  40. Pingback: prednisone 20mg pill

  41. Pingback: doxazosin and cialis

  42. Pingback: buy tadalafil generic india

  43. Pingback: generic ivermectin

  44. Pingback: viagra men

  45. Pingback: ivermectin lotion cost

  46. Pingback: cialis tubs

  47. Pingback: sildenafil pronunciation

  48. Pingback: how to get ivermectin

  49. Pingback: peptides tadalafil

  50. Pingback: cialis buy generic cialis online

  51. Pingback: sildenafilo

  52. Pingback: cheap sildenafil online in usa

  53. Pingback: canadian generic cialis online

  54. Pingback: buy generic cialis online from india

  55. Pingback: price of ivermectin tablets

  56. Pingback: sildenafil tablets uk

  57. Pingback: sildenafil tablets for sale

  58. Pingback: cialis coupon

  59. Pingback: tadalafil citrate

  60. Pingback: cialis for men

  61. Pingback: posologie de prednisone 20mg

  62. Pingback: what are the side effects of prednisone 20mg

  63. Pingback: antiviral for covid

  64. Pingback: cialis everyday

  65. Pingback: tadalafil goodrx

  66. Pingback: cialis prix

  67. Pingback: stromectol nz

  68. Pingback: side effects of prednisone

  69. Pingback: sildenafil viagra

  70. Pingback: cialis price

  71. Pingback: online casino real money free

  72. Pingback: cialis best price

  73. Pingback: ivermectin without prescription

  74. Pingback: ivermectin 8 mg

  75. Pingback: stromectol tablets

  76. Pingback: bingo for money online casino

  77. Pingback: cialis coupon

  78. Pingback: viagra no prescription

  79. Pingback: cialis tablets

  80. Pingback: ivermectin wormer

  81. Pingback: ivermectin use

  82. Pingback: ivermectin 3 mg over the counter

  83. Pingback: ivermectin ontario

  84. Pingback: ivermectin medication

  85. Pingback: ivermectin 12 mg tablets for humans for sale

  86. Pingback: buy ivermectin for humans

  87. Pingback: ivermectin oral

  88. Pingback: generic for ivermectin

  89. Pingback: lasix 240 mg

  90. Pingback: furosemide 20mg tab price

  91. Pingback: ivermectin lice

  92. Pingback: joe rogan ivermectin

  93. Pingback: ivermectin generic

  94. Pingback: buy ivermectin for humans australia

  95. Pingback: ivermectin online

  96. Pingback: luckyland slots casino download

  97. Pingback: cialis review

  98. Pingback: gpefy8.wixsite.compharmacypostoptimal-frequency-setting-of-metro-services-within-the-age-of-covid-19-distancing-measures

  99. Pingback: cheap doxycycline tablets

  100. Pingback: https://weruybsd.fireblogz.com/39575666/four-issues-to-do-immediately-about-online-pharmacies

  101. Pingback: stromectol walgreens

  102. Pingback: canada pharmacies online prescriptions

  103. Pingback: ivermectin tablet

  104. Pingback: keuybc.estranky.skclanky30-facts-you-must-know--a-covid-cribsheet.html

  105. Pingback: https://gwertvb.mystrikingly.com/

  106. Pingback: https://telegra.ph/Is-It-Safe-To-Lift-COVID-19-Travel-Bans-04-06

  107. Pingback: https://graph.org/The-Way-To-Get-Health-Care-At-Home-During-COVID-19---Health--Fitness-04-07

  108. Pingback: hydroxychloroquine ingredients

  109. Pingback: canada online pharmacy

  110. Pingback: https://canadian-pharmacies0.yolasite.com/

  111. Pingback: canada pharmacy online

  112. Pingback: no 1 canadian pharcharmy online

  113. Pingback: canadian pharmacycanadian pharmacy

  114. Pingback: seketu.gonevis.comhigh-10-tips-with-order-medicine-online-1

  115. Pingback: https://site128620615.fo.team/

  116. Pingback: https://625a9a98d5fa7.site123.me/blog/age-dependence-of-healthcare-interventions-for-covid-19-in-ontario-canada

  117. Pingback: https://hernswe.gonevis.com/scientists-model-true-prevalence-of-covid-19-throughout-pandemic/

  118. Pingback: https://selomns.gonevis.com/a-modified-age-structured-sir-model-for-covid-19-type-viruses/

  119. Pingback: ivermectin over the counter

  120. Pingback: stromectol medication

  121. Pingback: fwervs.gumroad.com

  122. Pingback: https://trosorin.mystrikingly.com/

  123. Pingback: https://sasnd0.wixsite.com/cialis/post/impotent-victims-can-now-cheer-up-try-generic-tadalafil-men-health

  124. Pingback: https://626106aa4da69.site123.me/blog/new-step-by-step-roadmap-for-tadalafil-5mg

  125. Pingback: ivermectin uk

  126. Pingback: buy generic cialis online

  127. Pingback: cialis over counter

  128. Pingback: https://hsoybn.estranky.sk/clanky/tadalafil-from-india-vs-brand-cialis---sexual-health.html

  129. Pingback: skuvsbs.gonevis.comwhen-tadalafil-5mg-competitors-is-good

  130. Pingback: hemuyrt.livejournal.com325.html

  131. Pingback: https://site373681070.fo.team/

  132. Pingback: sehytv.wordpress.com

  133. Pingback: mazhor4sezon

  134. Pingback: canadian drugstore

  135. Pingback: kerbgsw.mystrikingly.com

  136. Pingback: canadian pharmacy world

  137. Pingback: filmfilmfilmes

  138. Pingback: https://kewertyn.wordpress.com/2022/04/27/expect-more-virtual-house-calls-out-of-your-doctor-thanks-to-telehealth-revolution/

  139. Pingback: https://kerbiss.wordpress.com/2022/04/27/14/

  140. Pingback: gRh9UPV

  141. Pingback: heswcxc.wordpress.com20220430online-medicine-tablets-shopping-promotion-one-hundred-and-one

  142. Pingback: canadian pharmacy king

  143. Pingback: kertubs.mystrikingly.com

  144. Pingback: Northwest Pharmacy

  145. Pingback: https://canadian-pharmaceuticals-online.yolasite.com/

  146. Pingback: canada pharmacy

  147. Pingback: canadian pharmacies online prescriptions

  148. Pingback: canada online pharmacy

  149. Pingback: kertyun.flazio.com

  150. Pingback: https://kerntyas.gonevis.com/the-mafia-guide-to-online-pharmacies/

  151. Pingback: kerbnt.flazio.com

  152. Pingback: ivermectin uses

  153. Pingback: http://nanos.jp/jmp?url=http://cialisonlinei.com/

  154. Pingback: online pharmacy canada

  155. Pingback: womed7.wixsite.compharmacy-onlinepostnew-ideas-into-canada-pharmacies-never-before-revealed

  156. Pingback: canadian mail order pharmacies

  157. Pingback: https://sekyuna.gonevis.com/three-step-guidelines-for-online-pharmacies/

  158. Pingback: what is hydroxychloroquine used for

  159. Pingback: https://gewrt.usluga.me/

  160. Pingback: 9-05-2022

  161. Pingback: kinoteatrzarya.ru

  162. Pingback: https://pharmacy-online.webflow.io/

  163. Pingback: canadian-pharmacy.webflow.io

  164. Pingback: https://site273035107.fo.team/

  165. Pingback: site656670376.fo.team

  166. Pingback: TopGun2022

  167. Pingback: https://site561571227.fo.team/

  168. Pingback: Xvideos

  169. Pingback: XVIDEOSCOM Videos

  170. Pingback: https://site102906154.fo.team/

  171. Pingback: hekluy.ucraft.site

  172. Pingback: https://kawsear.fwscheckout.com/

  173. Pingback: ivanesva

  174. Pingback: https://hertnsd.nethouse.ru/

  175. Pingback: uertbx.livejournal.com402.html

  176. Pingback: lwerts.livejournal.com276.html

  177. Pingback: https://avuiom.sellfy.store/

  178. Pingback: https://pharmacies.bigcartel.com/

  179. Pingback: https://kwersd.mystrikingly.com/

  180. Pingback: Northwest Pharmacy

  181. Pingback: https://kqwsh.wordpress.com/2022/05/16/what-everybody-else-does-when-it-comes-to-online-pharmacies/

  182. Pingback: http://site592154748.fo.team/

  183. Pingback: lasert.gonevis.comrecommended-canadian-pharmacies-2

  184. Pingback: canada drug pharmacy

  185. Pingback: dkyubn.bizwebs.com

  186. Pingback: https://asebg.bigcartel.com/canadian-pharmacy

  187. Pingback: medicine-online.estranky.skclankyunderstand-covid-19-and-know-the-tricks-to-avoid-it-from-spreading-----medical-services.html

  188. Pingback: https://kertvbs.webgarden.com/

  189. Pingback: tadalafil cost

  190. Pingback: canada drugs

  191. Pingback: https://swenqw.company.site/

  192. Pingback: canadian mail order pharmacies

  193. Pingback: https://kaswesa.nethouse.ru/

  194. Pingback: https://628f789e5ce03.site123.me/blog/what-everybody-else-does-when-it-comes-to-canadian-pharmacies

  195. Pingback: Netflix

  196. Pingback: Zvezdy-v-Afrike-2-sezon-14-seriya

  197. Pingback: Krylya-nad-Berlinom

  198. Pingback: FILM

  199. Pingback: designchita.ru

  200. Pingback: YA-krasneyu

  201. Pingback: design-human.ru

  202. Pingback: designmsu.ru

  203. Pingback: vkl-design.ru

  204. Pingback: irida-design.ru

  205. Pingback: buy ivermectin in canada

  206. Pingback: https://canadian-pharmaceutical.webflow.io/

  207. Pingback: psy-

  208. Pingback: http://pamelaliggins.website2.me/

  209. Pingback: projectio

  210. Pingback: oral ivermectin cost

  211. Pingback: moskva psiholog online

  212. Pingback: slovar po psihoanalizu laplansh

  213. Pingback: psy online

  214. Pingback: http://pharmacy.prodact.site/

  215. Pingback: online pharmacies

  216. Pingback: https://hertb.mystrikingly.com/

  217. Pingback: kedmnx.estranky.skclankyonline-medicine-tablets-shopping-the-best-manner.html

  218. Pingback: https://selera.mystrikingly.com/

  219. Pingback: ksorvb.estranky.skclankywhy-online-pharmacies-is-good-friend-to-small-business.html

  220. Pingback: gevcaf.estranky.czclankysafe-canadian-online-pharmacies.html

  221. Pingback: kwersv.proweb.cz

  222. Pingback: kwervb.estranky.czclankycanadian-government-approved-pharmacies.html

  223. Pingback: purchasing ivermectin

  224. Pingback: bahis siteleri

  225. Pingback: DPTPtNqS

  226. Pingback: qQ8KZZE6

  227. Pingback: D6tuzANh

  228. Pingback: SHKALA TONOV

  229. Pingback: Øêàëà òîíîâ

  230. Pingback: russianmanagement.com

  231. Pingback: chelovek-iz-90-h

  232. Pingback: canada medication

  233. Pingback: https://kwsde.zombeek.cz/

  234. Pingback: 3Hk12Bl

  235. Pingback: 3NOZC44

  236. Pingback: heklrs.wordpress.com20220614canadian-government-approved-pharmacies

  237. Pingback: 01211

  238. Pingback: tor-lyubov-i-grom

  239. Pingback: film-tor-2022

  240. Pingback: hd-tor-2022

  241. Pingback: hdorg2.ru

  242. Pingback: online canadian pharmacy

  243. Pingback: ivermektin

  244. Pingback: Psikholog

  245. Pingback: netstate.ru

  246. Pingback: 3titania

  247. Pingback: site955305180.fo.team

  248. Pingback: Link

  249. Pingback: canada pharmacy

  250. Pingback: ivermectin at tractor supply

  251. Pingback: 62b2f636ecec4.site123.meblogcanadian-pharmaceuticals-online

  252. Pingback: 62b2ffff12831.site123.meblogcanadian-pharmaceuticals-for-usa-sales

  253. Pingback: tor-lyubov-i-grom.ru

  254. Pingback: psy

  255. Pingback: chelovek soznaniye mozg

  256. Pingback: https://thefencefilm.co.uk/community/profile/hswlux/

  257. Pingback: bit.ly

  258. Pingback: canada pharmacies online

  259. Pingback: sandbox.autoatlantic.comcommunityprofilekawxvb

  260. Pingback: stromectol without dr prescription

  261. Pingback: pharmacy canada

  262. Pingback: herbsd.iwopop.com

  263. Pingback: canadian pharmacies

  264. Pingback: cleantalkorg2.ru

  265. Pingback: bucha killings

  266. Pingback: War in Ukraine

  267. Pingback: Ukraine

  268. Pingback: Ukraine news – live

  269. Pingback: The Latest Ukraine News

  270. Pingback: https://www.reddit.com/user/dotijezo/comments/9xlg6g/online_pharmacies/

  271. Pingback: pharmacy canada

  272. Pingback: https://www.formlets.com/forms/tH7aROl1ugDpCHqB/

  273. Pingback: https://www.divephotoguide.com/user/pharmaceuticals/

  274. Pingback: www.formlets.comformsv7CoE3An9poMtRwF

  275. Pingback: site

  276. Pingback: http://cialis.iwopop.com/

  277. Pingback: https://www.divephotoguide.com/user/Pharmacy

  278. Pingback: buy viagra 25mg

  279. Pingback: stats

  280. Pingback: http://lsdevs.iwopop.com/

  281. Pingback: https://hub.docker.com/repository/docker/canadianpharmacys/pharmacies_in_canada_shipping_to_usa

  282. Pingback: Ukraine-war

  283. Pingback: movies

  284. Pingback: gidonline

  285. Pingback: canadianpharmacy.teachable.com

  286. Pingback: https://agrtyh.micro.blog/

  287. Pingback: www.artstation.cometnyqs6profile

  288. Pingback: mir dikogo zapada 4 sezon 4 seriya

  289. Pingback: canadian medications

  290. Pingback: web

  291. Pingback: film.8filmov.ru

  292. Pingback: https://www.formlets.com/forms/FgIl39avDRuHiBl4/

  293. Pingback: selaws.estranky.czclankycanadian-government-approved-pharmacies.html

  294. Pingback: video

  295. Pingback: https://kaswes.proweb.cz/

  296. Pingback: kvqtig.zombeek.cz

  297. Pingback: canada pharmacies online

  298. Pingback: kwerks.iwopop.com

  299. Pingback: canada drugs online

  300. Pingback: https://selaw.flazio.com/

  301. Pingback: list of reputable canadian pharmacies

  302. Pingback: https://canadianpharmaceutical.bigcartel.com/canadian-pharmaceuticals-online

  303. Pingback: https://azuvh4.wixsite.com/pharmaceuticals-onli/post/london-drugs-canada

  304. Pingback: cheap cialis canada

  305. Pingback: https://hub.docker.com/r/pharmacies/online

  306. Pingback: https://www.formlets.com/forms/N2BtJ3kPeJ3KclCw/

  307. Pingback: www.divephotoguide.comuserpharmacies

  308. Pingback: drugstore online

  309. Pingback: https://my.desktopnexus.com/Canadian-pharmacies/journal/safe-canadian-online-pharmacies-38571/

  310. Pingback: canadian-government-approved-pharmacies.webflow.io

  311. Pingback: https://lasevs.estranky.cz/clanky/pharmaceuticals-online-australia.html

  312. Pingback: canada drugs

  313. Pingback: pedrew.zombeek.cz

  314. Pingback: cialis over the counter at walmart

  315. Pingback: fermser.flazio.com

  316. Pingback: canadian pharmacy viagra brand

  317. Pingback: canada drugs online

  318. Pingback: canada pharmacy online

  319. Pingback: swebas.livejournal.com359.html

  320. Pingback: https://lawert.micro.blog/

  321. Pingback: top rated online canadian pharmacies

  322. Pingback: liusia-8-seriiaonlain

  323. Pingback: my.desktopnexus.comkawemnjournalpharmaceuticals-online-australia-38678

  324. Pingback: www.divephotoguide.comuserdrugs

  325. Pingback: hub.docker.comrdkwerdrugs

  326. Pingback: smotret-polnyj-film-smotret-v-khoroshem-kachestve

  327. Pingback: https://form.jotform.com/decote/canadian-pharmacies-shipping-to-the

  328. Pingback: linktr.eecanadianpharmacy

  329. Pingback: kawers.micro.blog

  330. Pingback: filmgoda.ru

  331. Pingback: rodnoe-kino-ru

  332. Pingback: https://mewser.mystrikingly.com/

  333. Pingback: https://sbwerd.estranky.sk/clanky/cialis-generic-pharmacy-online.html

  334. Pingback: buy tadalafil pills

  335. Pingback: buy cheap cialis no prescription

  336. Pingback: stat.netstate.ru

  337. Pingback: laswert.wordpress.com

  338. Pingback: kasheras.livejournal.com283.html

  339. Pingback: kwxcva.estranky.czclankycialis-20-mg.html

  340. Pingback: buy tadalafil online

  341. Pingback: owzpkg.zombeek.cz

  342. Pingback: http://lasweb.iwopop.com/

  343. Pingback: buy tadalafil online

Leave a Reply

Your email address will not be published.